Forums > Dev

Nothing in my perform method, and yet….

April 6, 2009 | 10:31 pm

I am having a truly bizarre problem where I am trying to debug my code, and have commented out all of my perform method. Yet, audio that’s coming into the object still gets sent out. How is this possible? All of my perform method except for the return statement is commented out. I have tried commenting out only the *out++ value, and got the same result. I tried setting *out++ = 0; and got the same result. Stranger still, *out++ is in an if statement, so nothing should even be coming out of it unless the condition for the if statement is true (which it hasn’t been). Where is this audio coming from?

At the web address below is my xcode project, including the code with the commented out perform method, as well as a test patch.

Thanks for any help.

http://www.music.mcgill.ca/~kkapla/rhythmslice2.zip


April 6, 2009 | 11:20 pm

I haven’t looked at your code, but most likely it is coming from the input. Signal vectors are reused for memory/cache efficiency, so if you do not write to your output, previous data in the signal chain will be left in your output vector. You *have* to zero your output if you want there to be silent output.

-Joshua


Viewing 2 posts - 1 through 2 (of 2 total)