From 3b69788398f70e138d1d60d22621a3d570942e1b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sun, 24 Dec 2017 22:47:58 +0100 Subject: [PATCH] Fix incoming calls for android (no sound because stream type was set to ring) --- coreapi/linphonecall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 20ae4ee61..d0a603540 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2698,7 +2698,6 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ char* cname; if (call->audiostream != NULL) return; - ms_snd_card_set_stream_type(lc->sound_conf.play_sndcard, MS_SND_CARD_STREAM_VOICE); if (call->sessions[call->main_audio_stream_index].rtp_session==NULL){ SalMulticastRole multicast_role = linphone_call_get_multicast_role(call,SalAudio); @@ -3564,6 +3563,9 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, LinphoneCallSta } } + if (playcard){ + ms_snd_card_set_stream_type(playcard, MS_SND_CARD_STREAM_VOICE); + } if (ok == TRUE) { int err = audio_stream_start_from_io(call->audiostream, call->audio_profile,