Re: Openal Digest, Vol 62, Issue 3
Greg Rahn <[email protected]> Thu, 5 May 2011 13:42:04 -0700
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
OK we'll read em down at rehearsal. Still no answer on July 4th. SOUNDMINDZ Music & Sound Design www.GregRahn.net Greg Rahn 707-246-4922 Linked In: http://www.linkedin.com/in/GregRahnMusic On May 5, 2011, at 12:00 PM, [email protected] wrote: > Send Openal mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://opensource.creative.com/mailman/listinfo/openal > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Openal digest..." > > > Today's Topics: > > 1. RE: RE: iPhone limit audio playback to speakers (Chris Perry) > 2. Re: RE: iPhone limit audio playback to speakers (Edward Rudd) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 4 May 2011 15:13:00 -0700 > From: Chris Perry <[email protected]> > Subject: RE: [Openal] RE: iPhone limit audio playback to speakers > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > > Posting this solution for completeness sake. > Interesting enough, it can be done! > Basically you add a property listener to get route change events: > AudioSessionAddPropertyListener > (kAudioSessionProperty_AudioRouteChange, > audioRouteChangeListenerCallback,0); > Then in the callback, determine if its a headphone being plugged-in > and override the audio route: UInt32 audioRouteOverride = > kAudioSessionOverrideAudioRoute_Speaker; > > AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, > sizeof(audioRouteOverride), &audioRouteOverride); > Too simple...-Chris > >> CC: [email protected]; [email protected] >> From: [email protected] >> Subject: Re: [Openal] RE: iPhone limit audio playback to speakers >> Date: Fri, 29 Apr 2011 13:24:30 -0700 >> To: [email protected] >> >> Results are in... Apparently this functionality is currently not >> supported. >> =] >> >> Sent from my iPad >> >> On Apr 29, 2011, at 1:06 AM, Chris Perry <[email protected]> >> wrote: >> >>> Thanks Eric, I think you are right. >>> >>> The AVAudioPlayer behaves as expected and Apple's implementation >>> of OpenAl correctly responds to other properties of the session, >>> just not the one I'm currently interested in =] >>> >>> I've submitted a tech support item with Apple regarding this issue >>> and will respond here when they get back to me! >>> >>> Thanks, >>> Chris >>> >>>> Date: Thu, 28 Apr 2011 11:06:13 -0700 >>>> Subject: Re: [Openal] RE: iPhone limit audio playback to speakers >>>> From: [email protected] >>>> To: [email protected] >>>> CC: [email protected] >>>> >>>> AudioSessions are an iOS specific item and are probably a bit >>>> outside >>>> the scope and expertise of this list. However, I'll give it a try. >>>> >>>> I've never tried overriding the output behavior on an iOS device. >>>> Does >>>> your technique work if you use, say AVAudioPlayer instead of >>>> OpenAL? >>>> If so, I would say you have indeed found a bug with Apple's iOS >>>> OpenAL >>>> implementation and you should file a bug with Apple to get this >>>> fixed. >>>> >>>> The caveat is that Apple's HI guidelines discourage you from >>>> trying to >>>> override the output device. Particularly on iOS, the user is >>>> supposed >>>> to be in control of these things and not automatically rerouting to >>>> headphones is a potentially user confusing behavior. >>>> >>>> -Eric >>>> -- >>>> Beginning iPhone Games Development >>>> http://playcontrol.net/iphonegamebook/ >>>> _______________________________________________ >>>> Openal mailing list >>>> [email protected] >>>> http://opensource.creative.com/mailman/listinfo/openal >>> _______________________________________________ >>> Openal mailing list >>> [email protected] >>> http://opensource.creative.com/mailman/listinfo/openal > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://opensource.creative.com/pipermail/openal/attachments/20110504/5e4d98ab/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Wed, 4 May 2011 19:30:46 -0400 > From: Edward Rudd <[email protected]> > Subject: Re: [Openal] RE: iPhone limit audio playback to speakers > To: Chris Perry <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset="us-ascii" > > On May 4, 2011, at 18:13 , Chris Perry wrote: > >> Posting this solution for completeness sake. >> >> Interesting enough, it can be done! >> >> Basically you add a property listener to get route change events: >> >> AudioSessionAddPropertyListener >> (kAudioSessionProperty_AudioRouteChange, >> audioRouteChangeListenerCallback,0); >> >> Then in the callback, determine if its a headphone being plugged-in >> and override the audio route: >> UInt32 audioRouteOverride = >> kAudioSessionOverrideAudioRoute_Speaker; >> >> AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, >> sizeof(audioRouteOverride), &audioRouteOverride); >> >> Too simple... > > > Chris, thanks for sharing this.. Very good to know. > > >> >>> CC: [email protected]; [email protected] >>> From: [email protected] >>> Subject: Re: [Openal] RE: iPhone limit audio playback to speakers >>> Date: Fri, 29 Apr 2011 13:24:30 -0700 >>> To: [email protected] >>> >>> Results are in... Apparently this functionality is currently not >>> supported. >>> =] >>> >>> Sent from my iPad >>> >>> On Apr 29, 2011, at 1:06 AM, Chris Perry <[email protected]> >>> wrote: >>> >>>> Thanks Eric, I think you are right. >>>> >>>> The AVAudioPlayer behaves as expected and Apple's implementation >>>> of OpenAl correctly responds to other properties of the session, >>>> just not the one I'm currently interested in =] >>>> >>>> I've submitted a tech support item with Apple regarding this >>>> issue and will respond here when they get back to me! >>>> >>>> Thanks, >>>> Chris >>>> >>>>> Date: Thu, 28 Apr 2011 11:06:13 -0700 >>>>> Subject: Re: [Openal] RE: iPhone limit audio playback to speakers >>>>> From: [email protected] >>>>> To: [email protected] >>>>> CC: [email protected] >>>>> >>>>> AudioSessions are an iOS specific item and are probably a bit >>>>> outside >>>>> the scope and expertise of this list. However, I'll give it a try. >>>>> >>>>> I've never tried overriding the output behavior on an iOS >>>>> device. Does >>>>> your technique work if you use, say AVAudioPlayer instead of >>>>> OpenAL? >>>>> If so, I would say you have indeed found a bug with Apple's iOS >>>>> OpenAL >>>>> implementation and you should file a bug with Apple to get this >>>>> fixed. >>>>> >>>>> The caveat is that Apple's HI guidelines discourage you from >>>>> trying to >>>>> override the output device. Particularly on iOS, the user is >>>>> supposed >>>>> to be in control of these things and not automatically rerouting >>>>> to >>>>> headphones is a potentially user confusing behavior. >>>>> >>>>> -Eric > > Edward Rudd > OutOfOrder.cc > 317-674-3296 > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://opensource.creative.com/pipermail/openal/attachments/20110504/4f4297af/attachment-0001.html > > ------------------------------ > > _______________________________________________ > Openal mailing list > [email protected] > http://opensource.creative.com/mailman/listinfo/openal > > > End of Openal Digest, Vol 62, Issue 3 > ************************************* > _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal