Re: Getting the PreferedHardwareIOBufferDuration
Re: Getting the PreferedHardwareIOBufferDuration
- Subject: Re: Getting the PreferedHardwareIOBufferDuration
- From: Mark's Studio <email@hidden>
- Date: Wed, 25 Feb 2009 21:13:28 +0100
I can get a similar behavior with the aurioTouch sample code,
it just sticks with the new duration and never goes back.
in my code i set the duration everytime just before i set the session
active.
there is actually a bug in the sample code in the InterruptListener().
I did have a lot of trouble implementing the whole interrupt begin /
end,
and the AudioRouteChange listener for doing the right thing
depending on the routeChangeReason and OtherAudioIsPlaying.
so maybe i've done something wrong.
It would be nice with an example of the whole interrupt /
audioRouteChange
that handled all possible ways it could happend.
On 25/02/2009, at 19.30, Greg Chapman wrote:
On Feb 25, 2009, at 4:08 AM, Mark's Studio wrote:
I set kAudioSessionProperty_PreferedHardwareIOBufferDuration to 0.005
and kAudioSessionProperty_CurrentHardwareIOBufferDuration returns
0.005805,
so that is fine
But if the iPod app is started the buffer duration change to 0.023220
and when restarting my audio (i do this by starting an
AVAudioPlayer,so the iPod fades out) the buffer duration stay there,
if i trigger another restart by removing the headset it goes back
to the prefered duration.
This seems like a bug... if you have interrupted the iPod app, you
should get all your hardware settings back (unless something else
weird is going on, like a phone call or something).
Can you write a bug please? If possible, include source code we can
build to reproduce the problem.
Is there anyway i can make sure i get the prefered duration ?
To try to work around the bug, you could try calling
AudioSessionSetActive(true) again before restarting; that might get
us to do the right thing. (I'm just guessing, though... I don't
know yet what the bug is.)
Greg
Peter Mark
Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078
Fax: +45 35366038
Mobile: +45 20416018
www.marks-studio.dk
email@hidden
_______________________________________________
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