fix lost of son when audio route changed

This commit is contained in:
Danmei Chen 2020-09-02 11:58:43 +02:00
parent cdfeebd241
commit 895d50adb4

View file

@ -1700,6 +1700,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
if (newRoute && newRoute.outputs.count > 0) {
NSString *route = newRoute.outputs[0].portType;
LOGI(@"Current audio route is [%s]", [route UTF8String]);
linphone_core_audio_route_changed(theLinphoneCore);
CallManager.instance.speakerEnabled = [route isEqualToString:AVAudioSessionPortBuiltInSpeaker];
if (([[AudioHelper bluetoothRoutes] containsObject:route]) && !CallManager.instance.speakerEnabled) {