Skip to content
Snippets Groups Projects
Commit 25820107 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9832: audio: clean up logging

parent 98a3cdb9
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ GainControl::GainControl(double sr, double target) : averager_(sr, SFL_GAIN_ATTA
, maxIncreaseStep_(exp(0.11513 * 12. * 160 / 8000)) // Computed on 12 frames (240 ms)
, maxDecreaseStep_(exp(-0.11513 * 40. * 160 / 8000))// Computed on 40 frames (800 ms)
{
DEBUG("GainControl: Target gain %f dB (%f linear)", targetLeveldB_, targetLevelLinear_);
DEBUG("Target gain %f dB (%f linear)", targetLeveldB_, targetLevelLinear_);
}
void GainControl::process(SFLDataFormat *buf, int samples)
......
......@@ -71,12 +71,12 @@ bool MainBuffer::removeCallIDSet(const std::string & set_id)
CallIDSet* callid_set = getCallIDSet(set_id);
if (!callid_set) {
DEBUG("removeCallIDSet error callid set %s does not exist!", set_id.c_str());
DEBUG("CallID set %s does not exist!", set_id.c_str());
return false;
}
if (callIDMap_.erase(set_id) == 0) {
DEBUG("removeCallIDSet error while removing callid set %s!", set_id.c_str());
DEBUG("CallID set %s not found!", set_id.c_str());
return false;
}
......@@ -96,9 +96,9 @@ void MainBuffer::removeCallIDfromSet(const std::string & set_id, const std::stri
CallIDSet* callid_set = getCallIDSet(set_id);
if (callid_set == NULL)
ERROR("removeCallIDfromSet error callid set %s does not exist!", set_id.c_str());
ERROR("CallIDSet %s does not exist!", set_id.c_str());
else if (callid_set->erase(call_id) == 0)
ERROR("removeCallIDfromSet error while removing callid %s from set %s!", call_id.c_str(), set_id.c_str());
ERROR("Could not find callID %s in set %s!", call_id.c_str(), set_id.c_str());
}
RingBuffer* MainBuffer::getRingBuffer(const std::string & call_id)
......@@ -123,11 +123,11 @@ bool MainBuffer::removeRingBuffer(const std::string & call_id)
delete ring_buffer;
return true;
} else {
ERROR("BufferManager: Error: Fail to delete ringbuffer %s!", call_id.c_str());
ERROR("Fail to delete ringbuffer %s!", call_id.c_str());
return false;
}
} else {
DEBUG("BufferManager: Error: Ringbuffer %s does not exist!", call_id.c_str());
DEBUG("Ringbuffer %s does not exist!", call_id.c_str());
return true;
}
}
......@@ -215,7 +215,7 @@ void MainBuffer::unBindHalfDuplexOut(const std::string & process_id, const std::
removeRingBuffer(call_id);
}
} else {
DEBUG("Error: did not found ringbuffer %s", process_id.c_str());
DEBUG("did not found ringbuffer %s", process_id.c_str());
removeCallIDSet(process_id);
}
......@@ -339,12 +339,12 @@ int MainBuffer::availForGetByID(const std::string &call_id,
const std::string &reader_id)
{
if ((call_id != DEFAULT_ID) and (reader_id == call_id))
ERROR("MainBuffer: Error: RingBuffer has a readpointer on itself");
ERROR("RingBuffer has a readpointer on itself");
RingBuffer* ringbuffer = getRingBuffer(call_id);
if (ringbuffer == NULL) {
ERROR("MainBuffer: Error: RingBuffer does not exist");
ERROR("RingBuffer does not exist");
return 0;
} else
return ringbuffer->AvailForGet(reader_id);
......
......@@ -33,7 +33,7 @@
Recordable::Recordable() : recAudio_(), recorder_(&recAudio_, Manager::instance().getMainBuffer())
{
DEBUG("=================== Set recornding options: %s", Manager::instance().audioPreference.getRecordpath().c_str());
DEBUG("Set recording options: %s", Manager::instance().audioPreference.getRecordpath().c_str());
recAudio_.setRecordingOption(AudioRecord::FILE_WAV, 8000, Manager::instance().audioPreference.getRecordpath());
}
......
......@@ -132,7 +132,7 @@ RingBuffer::storeReadPointer(int pointer_value, const std::string &call_id)
if (iter != readpointer_.end())
iter->second = pointer_value;
else
DEBUG("storeReadPointer: Cannot find \"%s\" readPointer in \"%s\" ringbuffer", call_id.c_str(), buffer_id_.c_str());
DEBUG("Cannot find \"%s\" readPointer in \"%s\" ringbuffer", call_id.c_str(), buffer_id_.c_str());
}
......
......@@ -48,7 +48,7 @@ SpeexEchoCancel::SpeexEchoCancel() :
tmpMic_(),
tmpOut_()
{
DEBUG("EchoCancel: Initializing echo canceller with delay: %d, filter "
DEBUG("Initializing echo canceller with delay: %d, filter "
"length: %d, frame size: %d and samplerate %d", echoDelay_,
echoTailLength_, EC_FRAME_SIZE, SPEEX_SAMPLE_RATE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment