Skip to content
Snippets Groups Projects
Commit 0c0d2c30 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

Minor modification to samplerate converter

parent d29214be
Branches
Tags
No related merge requests found
...@@ -218,7 +218,6 @@ IAXVoIPLink::getEvent() ...@@ -218,7 +218,6 @@ IAXVoIPLink::getEvent()
if(call){ if(call){
// _debug("Are we recording");
call->recAudio.recData(spkrDataConverted,micData,nbSampleForRec_,nbSampleForRec_); call->recAudio.recData(spkrDataConverted,micData,nbSampleForRec_,nbSampleForRec_);
} }
...@@ -230,7 +229,6 @@ IAXVoIPLink::getEvent() ...@@ -230,7 +229,6 @@ IAXVoIPLink::getEvent()
sendRegister(""); sendRegister("");
} }
// _debug("IAXVoIPLink::getEvent() \n");
// reinitialize speaker buffer for recording (when recording a voice mail) // reinitialize speaker buffer for recording (when recording a voice mail)
for (int i = 0; i < nbSampleForRec_; i++) for (int i = 0; i < nbSampleForRec_; i++)
spkrDataConverted[i] = 0; spkrDataConverted[i] = 0;
......
...@@ -64,8 +64,10 @@ void SamplerateConverter::init( void ) { ...@@ -64,8 +64,10 @@ void SamplerateConverter::init( void ) {
// libSamplerateConverter-related // libSamplerateConverter-related
// Set the converter type for the upsampling and the downsampling // Set the converter type for the upsampling and the downsampling
// interpolator SRC_SINC_BEST_QUALITY // interpolator SRC_SINC_BEST_QUALITY
_src_state_mic = src_new(SRC_LINEAR, 1, &_src_err); // interpolator SRC_SINC_FASTEST
_src_state_spkr = src_new(SRC_LINEAR, 1, &_src_err); // 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 ); int nbSamplesMax = (int) ( getFrequence() * getFramesize() / 1000 );
_floatBufferDownMic = new float32[nbSamplesMax]; _floatBufferDownMic = new float32[nbSamplesMax];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment