Commit 5c71ff21 authored by Ghislain MARY's avatar Ghislain MARY

Use the kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation flag when...

Use the kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation flag when deactivating the audio session.

This enables music playing to be restored when a call terminates.
parent 430cc137
......@@ -784,7 +784,8 @@ static void aq_stop_r(MSFilter * f)
AudioQueueDispose(d->readQueue, true);
#if TARGET_OS_IPHONE
check_aqresult(AudioSessionSetActive(false),"AudioSessionSetActive(false)");
OSStatus aqresult = AudioSessionSetActiveWithFlags(false, kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation);
check_aqresult(aqresult,"AudioSessionSetActive(false)");
#endif
}
}
......@@ -884,7 +885,8 @@ static void aq_stop_w(MSFilter * f)
AudioQueueDispose(d->writeQueue, true);
#if TARGET_OS_IPHONE
check_aqresult(AudioSessionSetActive(false),"AudioSessionSetActive(false)");
OSStatus aqresult = AudioSessionSetActiveWithFlags(false, kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation);
check_aqresult(aqresult,"AudioSessionSetActive(false)");
#endif
}
}
......
......@@ -497,7 +497,8 @@ static void destroy_audio_unit (au_card_t* d) {
AudioComponentInstanceDispose (d->io_unit);
d->io_unit=NULL;
if (!d->is_fast) {
check_au_session_result(AudioSessionSetActive(false),"AudioSessionSetActive(false)");
OSStatus auresult = AudioSessionSetActiveWithFlags(false, kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation);
check_au_session_result(auresult,"AudioSessionSetActive(false)");
}
ms_message("AudioUnit destroyed");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment