문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top