Question

I just found that my AudioSessionSetActive(false) call in my "shutdown" code never returns noErr. There are some undocumented code like (OSStatus) 803204036, which corresponds to none of the listed return codes: http://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/AudioSessionServicesReference/Reference/reference.html

And I went through all listed Xcode sample codes that are relevant to AudioSessionSetActive() and found absolutely no calls with "false" argument. All the samples just call AudioSessionSetActive(true) under various scenarios. The samples are:

iPhoneExtAudioFileConvertTest
iPhoneMixerEQGraphTest
iPhoneMultichannelMixerTest
MusicCube
oalTouch
aurioTouch
aurioTouch2
GLAirplay
iPhoneACFileConvertTest
iPhoneMixerEQGraphTest
SpeakHere

Is that we are not supposed to call AudioSessionSetActive() with false ourselves? Is it that the deactivation is handled implicitly?

Was it helpful?

Solution

Ok, I've found the issue myself. I tried to set it to false before calling AudioOutputUnitStop() and AudioUnitUninitialize().

I was able to fix it by calling AudioSessionSetActive(false) after those calls have succeeded.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top