Changing buffer size on iOS when app is in background
Changing buffer size on iOS when app is in background
- Subject: Changing buffer size on iOS when app is in background
- From: Daniel Blezek <email@hidden>
- Date: Fri, 11 Feb 2011 11:14:44 -0600
Hi all,
I'm very new to Core Audio and have been having playback issues on
the iOS. My sound is fine while the app is in the background,
however, after the app is sent to the background and restored to the
foreground, the audio becomes very choppy. Some helpful posts on the
Apple dev forums pointed out that iOS increases the buffer size when
an app goes to the background, presumably to increase battery life.
My app doesn't catch this, and continues filling up only part of the
buffer, so my audio is choppy and sounds stretched.
The most simple thing would seem to be to register a callback for
this change, and reset the buffer size to what the app is expecting (I
don't play audio while in the background).
I think the property is kAudioQueueProperty_DecodeBufferSizeFrames,
but I have not found any example code or good documentation on how to
use this. Can someone point me to an example or documentation?
Thanks much,
-dan
P.S. The original forum discussion is here:
https://devforums.apple.com/thread/85762?tstart=0
_______________________________________________
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