[sipxtapi] r1430 committed - Applied patch from Saab:...

1 view
Skip to first unread message

codesite...@google.com

unread,
Feb 7, 2011, 5:56:13 PM2/7/11
to sipxtapi...@googlegroups.com
Revision: 1430
Author: jaroslavl1
Date: Mon Feb 7 14:45:58 2011
Log: Applied patch from Saab:
- Just as curAmplitude is set to one if 0, so is prevAmplitude - this may
not be necesarry but we have seen problems with this in the sipfoundry
implementation.

http://code.google.com/p/sipxtapi/source/detail?r=1430

Modified:
/trunk/sipXmediaLib/src/mp/MpBridgeAlgLinear.cpp

=======================================
--- /trunk/sipXmediaLib/src/mp/MpBridgeAlgLinear.cpp Fri Jan 8 14:50:06
2010
+++ /trunk/sipXmediaLib/src/mp/MpBridgeAlgLinear.cpp Mon Feb 7 14:45:58
2011
@@ -605,10 +605,16 @@
const MpAudioBufPtr pInBuf(inBufs[origInput]);
MpAudioSample prevAmplitude = mpPrevAmplitudes[origInput];
MpAudioSample curAmplitude = pInBuf->getAmplitude();
+ // Make sure curAmplitude is not 0 as it will result in a
division by 0
if (curAmplitude == 0)
{
curAmplitude = 1;
}
+ // Make sure prevAmplitude is not 0 as it will result in a
division by 0
+ if (prevAmplitude == 0)
+ {
+ prevAmplitude = 1;
+ }

mpMixDataSpeechType[extOutput] = pInBuf->getSpeechType();
if ( mExtendedInputs.getGain(extInput) ==
MP_BRIDGE_GAIN_PASSTHROUGH

Reply all
Reply to author
Forward
0 new messages