• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iPhone - RenderCallback not called when phone is locked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: iPhone - RenderCallback not called when phone is locked
      • From: Aran Mulholland <email@hidden>
References: 
 >iPhone - RenderCallback not called when phone is locked (From: John Morris <email@hidden>)
 >Re: iPhone - RenderCallback not called when phone is locked (From: William Stewart <email@hidden>)
 >Re: iPhone - RenderCallback not called when phone is locked (From: John Morris <email@hidden>)
 >Re: iPhone - RenderCallback not called when phone is locked (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Correctly implementing TranslateTime and GetNearestStartTime in HAL user-land plugin
  • Next by Date: Re: AU Presets for multiple plugins
  • Previous by thread: Re: Re: iPhone - RenderCallback not called when phone is locked
  • Next by thread: Re: iPhone - RenderCallback not called when phone is locked
  • Index(es):
    • Date
    • Thread