Re: iPhone - RenderCallback not called when phone is locked
Re: iPhone - RenderCallback not called when phone is locked
- Subject: Re: iPhone - RenderCallback not called when phone is locked
- From: John Morris <email@hidden>
- Date: Wed, 18 Nov 2009 13:17:08 -0800
Hmmm....I hacked up my code and inserted it into a new project (the OpenGL ES template). Same behavior. The meat and potatoes are in a file called audio.cpp.
You can grab the test project here:
<http://evolutioninteractive.com/stuff/audiotest.zip>
Someone mentioned that they saw similar issues related to doing too much work, so this test just outputs silence (a simple memset() with the kAudioUnitRenderAction_OutputIsSilence hint).
So, what this app does is just dump a "." out to the console for each call into the RenderCallback. When you start up the app, it will start with the debug output (making big strings of periods). When you hit the lock button, the output will stop. When you unlock it, it will start up again. This is the crux of the problem. When the device locks, the sound keeps playing, but the RenderCallback isn't called to refresh the buffer, so it just keeps playing the same (last filled) buffer over and over. And this is with the category set to MediaPlayback.
Thanks,
John Morris
Evolution Interactive
On Nov 17, 2009, at 4:21 PM, John Morris wrote:
> Hmmm....I hacked up my code and inserted it into a new project (the OpenGL ES template). Same behavior. I attached the test project. The meat and potatoes are in a file called audio.cpp.
>
> Someone mentioned that they saw similar issues related to doing too much work, so this sample just outputs silence (a simple memset() with the kAudioUnitRenderAction_OutputIsSilence hint).
>
> So, what this app does is just dump a "." out to the console for call into the RenderCallback. When you start up the app, it will start with the debug output (making big strings of periods). When you hit the lock button, the output will stop. When you unlock it, it will start up again. This is the crux of the problem. When the device locks, the sound keeps playing, but the RenderCallback isn't called to refresh the buffer, so it just keeps playing the same (last filled) buffer over and over. And this is with the category set to MediaPlayback.
>
> Thanks,
> John Morris
> Evolution Interactive
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden