From 0c0d2c3098d2ee0acc78cb13c0bd411acf98a87d Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.net>
Date: Mon, 9 Mar 2009 09:55:03 -0400
Subject: [PATCH] Minor modification to samplerate converter

---
 src/iaxvoiplink.cpp         | 4 +---
 src/samplerateconverter.cpp | 6 ++++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/iaxvoiplink.cpp b/src/iaxvoiplink.cpp
index 79466dc502..af965c32a4 100644
--- a/src/iaxvoiplink.cpp
+++ b/src/iaxvoiplink.cpp
@@ -218,8 +218,7 @@ IAXVoIPLink::getEvent()
 
    
     if(call){
-      // _debug("Are we recording");
-        call->recAudio.recData(spkrDataConverted,micData,nbSampleForRec_,nbSampleForRec_);
+      call->recAudio.recData(spkrDataConverted,micData,nbSampleForRec_,nbSampleForRec_);
     }
 
     // Do the doodle-moodle to send audio from the microphone to the IAX channel.
@@ -230,7 +229,6 @@ IAXVoIPLink::getEvent()
         sendRegister("");
     }
   
-    // _debug("IAXVoIPLink::getEvent() \n");
     // reinitialize speaker buffer for recording (when recording a voice mail)
     for (int i = 0; i < nbSampleForRec_; i++)
         spkrDataConverted[i] = 0;
diff --git a/src/samplerateconverter.cpp b/src/samplerateconverter.cpp
index a4e8474d37..e1990f930e 100644
--- a/src/samplerateconverter.cpp
+++ b/src/samplerateconverter.cpp
@@ -64,8 +64,10 @@ void SamplerateConverter::init( void ) {
   // libSamplerateConverter-related
   // Set the converter type for the upsampling and the downsampling
   // interpolator SRC_SINC_BEST_QUALITY
-  _src_state_mic  = src_new(SRC_LINEAR, 1, &_src_err);
-  _src_state_spkr = src_new(SRC_LINEAR, 1, &_src_err);
+  // interpolator SRC_SINC_FASTEST
+  // interpolator SRC_LINEAR
+  _src_state_mic  = src_new(SRC_SINC_FASTEST, 1, &_src_err);
+  _src_state_spkr = src_new(SRC_SINC_FASTEST, 1, &_src_err);
 
   int nbSamplesMax = (int) ( getFrequence() * getFramesize() / 1000 );
   _floatBufferDownMic  = new float32[nbSamplesMax];
-- 
GitLab