Re: Changing buffer size on iOS when app is in background
Re: Changing buffer size on iOS when app is in background
- Subject: Re: Changing buffer size on iOS when app is in background
- From: Daniel Blezek <email@hidden>
- Date: Fri, 11 Feb 2011 11:37:09 -0600
Hi Steve,
Sorry, my sound is fine when the app is in the _foreground_. The
sound is muted while in the background, and when the app comes back to
the foreground, it is choppy.
I did some more reading, looks like I need to specify my preferred
buffer duration using this code:
NSTimeInterval preferredBufferDuration = 0.005;
[[AVAudiosession sharedInstance]
setPreferredIOBufferDuration: preferredBufferDuration
error: &setPreferenceError];
I'll give this a go tonight and see what happens.
Best,
-dan
On Fri, Feb 11, 2011 at 11:27 AM, Steve Bird <email@hidden> wrote:
>
> On Feb 11, 2011, at 12:14 PM, Daniel Blezek wrote:
>
>> Hi all,
>>
>> My sound is fine while the app is in the background,
>
> --- that seems to conflict with this:
>
>
>> 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.
>
> --- if the change occurs when the app moves TO the background, then it would seem like the problem would start then, as well.
>
>
> ----------------------------------------------------------------
> Steve Bird
> Culverson Software - Elegant software that is a pleasure to use.
> www.Culverson.com (toll free) 1-877-676-8175
>
>
>
_______________________________________________
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