Hello, all ...
I'm seeing a crash that happens when after I call AudioQueueStop(). Basically what seems to be happening is this:
1. an NSURLConnection received data and called AudioFileStreamParseBytes(), which calls my packets procedure 2. while inside said packets proc, AudioQueueStop() is called on another thread, making the memcpy() in my packets proc crash with EXC_BAD_ACCESS
I've tried solving this by putting a mutex inside of my packets proc that guards the whole function, and wait on the same mutex before I call AudioQueueStop(), but wow ... this gets rid of the crash, but makes stopping the audio take 10 seconds or more, because the data block sent to AudioFileStreamParseBytes() has like 500 packets in it or something, so it takes awhile to digest them.
What would be the best way to handle this? Clearly i'm not understanding something, though i'm really trying.
Regards,
John
Falling You - exploring the beauty of voice and sound
|