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

[#2209] Clean up debug messages

parent 18575530
No related branches found
No related tags found
No related merge requests found
...@@ -310,30 +310,17 @@ namespace sfl { ...@@ -310,30 +310,17 @@ namespace sfl {
assert(_audiocodec); assert(_audiocodec);
assert(_audiolayer); assert(_audiolayer);
_debug("AudioRtpSession::processDataEncode %s\n", _ca->getCallId().c_str());
int _mainBufferSampleRate = _audiolayer->getMainBuffer()->getInternalSamplingRate(); int _mainBufferSampleRate = _audiolayer->getMainBuffer()->getInternalSamplingRate();
_debug(" _mainBufferSampleRate %i\n", _mainBufferSampleRate);
_debug(" converterSamplingRate %i\n", converterSamplingRate);
_debug(" _audiocodec->getFrameSize() %i, _audiocodec->getClockRate() %i\n", _audiocodec->getFrameSize(), _audiocodec->getClockRate());
// compute codec framesize in ms // compute codec framesize in ms
float fixed_codec_framesize = computeCodecFrameSize (_audiocodec->getFrameSize(), _audiocodec->getClockRate()); float fixed_codec_framesize = computeCodecFrameSize (_audiocodec->getFrameSize(), _audiocodec->getClockRate());
_debug(" fixed_codec_framesize %f\n", fixed_codec_framesize);
// compute nb of byte to get coresponding to 20 ms at audio layer frame size (44.1 khz) // compute nb of byte to get coresponding to 20 ms at audio layer frame size (44.1 khz)
int maxBytesToGet = computeNbByteAudioLayer (fixed_codec_framesize); int maxBytesToGet = computeNbByteAudioLayer (fixed_codec_framesize);
_debug(" maxBytesToGet %i\n", maxBytesToGet);
// available bytes inside ringbuffer // available bytes inside ringbuffer
int availBytesFromMic = _audiolayer->getMainBuffer()->availForGet(_ca->getCallId()); int availBytesFromMic = _audiolayer->getMainBuffer()->availForGet(_ca->getCallId());
_debug(" availBytesFromMic %i\n", availBytesFromMic);
// set available byte to maxByteToGet // set available byte to maxByteToGet
int bytesAvail = (availBytesFromMic < maxBytesToGet) ? availBytesFromMic : maxBytesToGet; int bytesAvail = (availBytesFromMic < maxBytesToGet) ? availBytesFromMic : maxBytesToGet;
...@@ -343,8 +330,6 @@ namespace sfl { ...@@ -343,8 +330,6 @@ namespace sfl {
// Get bytes from micRingBuffer to data_from_mic // Get bytes from micRingBuffer to data_from_mic
int nbSample = _audiolayer->getMainBuffer()->getData(_micData , bytesAvail, 100, _ca->getCallId()) / sizeof (SFLDataFormat); int nbSample = _audiolayer->getMainBuffer()->getData(_micData , bytesAvail, 100, _ca->getCallId()) / sizeof (SFLDataFormat);
_debug(" nbSample %i\n", nbSample);
// nb bytes to be sent over RTP // nb bytes to be sent over RTP
int compSize = 0; int compSize = 0;
...@@ -356,8 +341,6 @@ namespace sfl { ...@@ -356,8 +341,6 @@ namespace sfl {
compSize = _audiocodec->codecEncode (_micDataEncoded, _micDataConverted, nbSample*sizeof (int16)); compSize = _audiocodec->codecEncode (_micDataEncoded, _micDataConverted, nbSample*sizeof (int16));
_debug(" nbSample(in resampling block) %i\n", nbSample);
} else { } else {
// no resampling required // no resampling required
compSize = _audiocodec->codecEncode (_micDataEncoded, _micData, nbSample*sizeof (int16)); compSize = _audiocodec->codecEncode (_micDataEncoded, _micData, nbSample*sizeof (int16));
...@@ -370,8 +353,6 @@ namespace sfl { ...@@ -370,8 +353,6 @@ namespace sfl {
void AudioRtpSession<D>::processDataDecode(unsigned char * spkrData, unsigned int size, int& countTime) void AudioRtpSession<D>::processDataDecode(unsigned char * spkrData, unsigned int size, int& countTime)
{ {
_debug("AudioRtpSession::processDataDecode %s\n", _ca->getCallId().c_str());
if (_audiocodec != NULL) { if (_audiocodec != NULL) {
...@@ -383,10 +364,6 @@ namespace sfl { ...@@ -383,10 +364,6 @@ namespace sfl {
// buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes // buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes
int nbSample = expandedSize / sizeof (SFLDataFormat); int nbSample = expandedSize / sizeof (SFLDataFormat);
_debug(" nbSample %i\n", nbSample);
_debug(" _mainBufferSampleRate %i\n", _mainBufferSampleRate);
// test if resampling is required // test if resampling is required
if (_audiocodec->getClockRate() != _mainBufferSampleRate) { if (_audiocodec->getClockRate() != _mainBufferSampleRate) {
...@@ -398,8 +375,6 @@ namespace sfl { ...@@ -398,8 +375,6 @@ namespace sfl {
// Store the number of samples for recording // Store the number of samples for recording
_nSamplesSpkr = nbSample; _nSamplesSpkr = nbSample;
_debug(" nbSample (in resampling block) %i\n", nbSample);
// put data in audio layer, size in byte // put data in audio layer, size in byte
_audiolayer->getMainBuffer()->putData (_spkrDataConverted, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId()); _audiolayer->getMainBuffer()->putData (_spkrDataConverted, nbSample * sizeof (SFLDataFormat), 100, _ca->getCallId());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment