linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Problem when call from an IP phone to linphonec


From: Roy Huang
Subject: [Linphone-developers] Problem when call from an IP phone to linphonec
Date: Tue, 14 Nov 2006 16:11:17 +0800

Hi,

I have a Polycom IP phone, model SoundPoint IP 300SIP. I download
linphone 1.5.0 to my PC, compile it without gnome and install it. Then
I start linphonec.

If call from linphonec to IP phone, it works fine, If call from IP
phone to linphonec, the sounds are terrible. After study log file, I
find the root cause: When IP phone call linphonec, linphonec play ring
file /usr/share/sounds/linphone/rings/oldphone.wav. This is a stereo
file, so Ringstream set sound card in stereo mode. After answer to
accept the call, linphonec will start audio stream, but it don't reset
the mode and it still keep stereo mode setting. But audio stream only
offer mono audio to sound.

I confirm that by remove rings/oldphone.wav or change oldphone.wav to
a mono file. The call will become normal.

The following patch seems also fix this problem. Please have a look.

diff -ur linphone-1.5.0.orig/mediastreamer2/src/audiostream.c
linphone-1.5.0/mediastreamer2/src/audiostream.c
--- linphone-1.5.0.orig/mediastreamer2/src/audiostream.c        2006-10-04
18:01:11.000000000 +0800
+++ linphone-1.5.0/mediastreamer2/src/audiostream.c     2006-11-14
15:58:28.000000000 +0800
@@ -221,7 +221,12 @@
        /* give the sound filters some properties */
        
ms_filter_call_method(stream->soundread,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate);
        
ms_filter_call_method(stream->soundwrite,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate);
-       
+       if (outfile==NULL) {
+               int tmp = 1;
+
+               ms_filter_call_method(stream->soundwrite,MS_FILTER_SET_NCHANNELS, 
&tmp);
+       }
+
        /* give the encoder/decoder some parameters*/
        
ms_filter_call_method(stream->encoder,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate);
        
ms_filter_call_method(stream->encoder,MS_FILTER_SET_BITRATE,&pt->normal_bitrate);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]