Call new mediastreamer2 stream type API to fix ringing from linphone in wrong stream on Android

This commit is contained in:
Sylvain Berfini 2017-11-20 15:18:39 +01:00
parent eb8c416848
commit 28950cd3f4
2 changed files with 3 additions and 0 deletions

View file

@ -2698,6 +2698,8 @@ 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);
SalMediaDescription *remotedesc=NULL;

View file

@ -3683,6 +3683,7 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){
if (lc->ringstream && lc->dmfs_playing_start_time!=0){
linphone_core_stop_dtmf_stream(lc);
}
ms_snd_card_set_stream_type(ringcard, MS_SND_CARD_STREAM_RING);
linphone_ringtoneplayer_start(lc->factory, lc->ringtoneplayer, ringcard, lc->sound_conf.local_ring, 2000);
}else{
/* else play a tone within the context of the current call */