Skip to content

Commit f6f69a9

Browse files
author
Clement Champetier
committed
AudioGenerator: added log
1 parent 63ceba0 commit f6f69a9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/AvTranscoder/decoder/AudioGenerator.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#include "AudioGenerator.hpp"
22

3+
#include <AvTranscoder/util.hpp>
4+
5+
#include <sstream>
6+
37
namespace avtranscoder
48
{
59

@@ -42,13 +46,23 @@ bool AudioGenerator::decodeNextFrame(Frame& frameBuffer)
4246
{
4347
AudioFrame& audioBuffer = static_cast<AudioFrame&>(frameBuffer);
4448
_silent = new AudioFrame(audioBuffer.desc());
49+
50+
std::stringstream msg;
51+
msg << "Generate a silence with the following features:" << std::endl;
52+
msg << "sample rate = " << _silent->getSampleRate() << std::endl;
53+
msg << "number of channels = " << _silent->getNbChannels() << std::endl;
54+
msg << "sample format = " << getSampleFormatName(_silent->getSampleFormat()) << std::endl;
55+
msg << "number of samples per channel = " << _silent->getNbSamplesPerChannel() << std::endl;
56+
LOG_INFO(msg.str())
4557
}
58+
LOG_DEBUG("Copy data of the silence when decode next frame")
4659
frameBuffer.getAVFrame().nb_samples = _silent->getAVFrame().nb_samples;
4760
frameBuffer.copyData(*_silent);
4861
}
4962
// Take audio frame from _inputFrame
5063
else
5164
{
65+
LOG_DEBUG("Copy data of the audio specified when decode next frame")
5266
frameBuffer.copyData(*_inputFrame);
5367
}
5468
return true;

0 commit comments

Comments
 (0)