RE: iPhone limit audio playback to speakers
Chris Perry <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
Just to add to this: Before initializing openal I configure an AVAudioSession object to not play sounds from the iphone's headphone jack, however openal seems to ignore this setting. // setup audio session NSError *error = nil; AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]; NSAssert(error == nil, @"Failed to set audio session category."); // Make sure the sounds don't play out the headphone jack OSStatus propertySetError = 0; UInt32 doChangeDefaultRoute = true; propertySetError = AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, sizeof(doChangeDefaultRoute), &doChangeDefaultRoute); NSAssert(propertySetError == 0, @"Failed to set audio session property: OverrideCategoryDefaultToSpeaker"); Neither of those NSAsserts fire. The iphone dev website says to direct openal questions to this forum.Anyone have experience with this?thanks,Chris > Subject: iPhone limit audio playback to speakers > From: [email protected] > Date: Wed, 27 Apr 2011 21:52:40 -0700 > To: [email protected] > > Hi there, > Is it possible to configure openal to play audio from an iPhone's built-in speaker regardless of wether or not something is plugged into the headphone jack? > > In other words, I'd like openal to continue to pipe audio output thru the built in speakers when I plug a mic into the headphone jack. > > Thanks! > > > > Sent from my iPad _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal