Re: Changing the audio session audio route (Speaker or none ) when using AVAudioPlayer
Re: Changing the audio session audio route (Speaker or none ) when using AVAudioPlayer
- Subject: Re: Changing the audio session audio route (Speaker or none ) when using AVAudioPlayer
- From: William Stewart <email@hidden>
- Date: Mon, 23 Mar 2009 15:47:42 -0700
On Mar 23, 2009, at 12:38 AM, Inca Rose wrote:
Hi;
AVAudioPlayer plays using the default route of the Audio Session.
AVAudioPlayer uses the current audio session as established by the
client. If the client has not set anything up, it gets the default
settings - this is the same for aurio and audio queue as well
What hapend if I want to re route the audio to another output like
the speakers ?
Can I call
audioRoute = kAudioSessionOverrideAudioRoute_Speaker;
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute,
sizeof(audioRoute), &audioRoute);
Before calling [AVAudioPlayer play] ?
if the category, and the user's actions, permit. Yes
I think a new version of play ( or prepare to play ) with a new
route parameter will be
a good idea for next version.
you misunderstand the interactions of these things. partly our fault
and we are preparing some documents to explain this better, but
basically audio sessions have to do with the overall state of the
device, not individual actions (such as audio file playback)...
For instance, you couldn't have two AVAudioPlayers playing audio to
different destinations because it doesn't work like that. The speaker
setting is an overide for the device, not for a given sound
Bill
Thanks
Inca R
_______________________________________________
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
_______________________________________________
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