Audio queue and EXC_BAD_ACCESS

402 Views Asked by At

this is my code for generating noise using Audio Queue:

http://pastebin.com/Kn8GU72J

The problem is that my code generates an EXC_BAD_ACCESS. The problem seems to be in the assignment

    MAAudioManager *audioMngr = (__bridge MAAudioManager *) inUserData;

in the callback routine. I suspect that could be something related to the access by the thread of the class MAAudioManager.

Any idea?

1

There are 1 best solutions below

6
On BEST ANSWER

Is there anything elsewhere in the program that retains the MAAudioManager instance? It looks like it's been dealloc'd by the time that the callback gets called.