Problem with AudioQueueStart() on iPad
I am having the following problem with Audio Queue Services, and was hoping it sounded familiar to someone else.
First I execute:
AudioQueueAddPropertyListener(audioQueue, kAudioQueueProperty_IsRunning, MyAudioQueueIsRunningCallback, self);
Then later I execute:
AudioQueueStart(audioQueue, NULL);
Both calls return no errors but MyAudioQueueIsRunningCallback
never gets called. I can even call AudioQueueGetProperty
to check the property kAudioQueueProperty_IsRunning
and this check confirms that the property is non-zero.
I've obviously left a lot of code about but I th开发者_C百科ink these are the essentials. The strangest part is that the code works fine on the iPad 3.2.2 when compiled for Debug but not Release. It also works fine when compiled for Release on the iPhone 4.0 and iPod 4.0, as well as both simulators in xcode.
If it makes any difference, the code I'm using is derived from this file.
I had the same problem, and this was the solutions,
AudioQueue problem
Basically, you must start AudioQueue form the MainThread( perhaps UI Thread )
精彩评论