Commit 332e2693 authored by DanmeiChen's avatar DanmeiChen
Browse files

fix no ringback in background again

parent e630e0ce
......@@ -515,7 +515,14 @@ static void au_audio_session_activated(MSSndCard *obj, bool_t activated) {
au_card_t *d = (au_card_t*)obj->data;
d->audio_session_activated = activated;
ms_message("AVAudioSession activated: %i", (int)activated);
if(activated) {
/*
For callkit (outgoing call), audio session should be configured earlier.
To avoid configuring audio session in background (bad thread), which will not work for callkit.
*/
configure_audio_session(d);
}
if (activated && d->audio_unit_state == MSAudioUnitCreated){
/*
The sample rate is known only after that the AudioSession is activated.
......
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