Skip to content

Commit

Permalink
Logging/Opus: add basic stream info at loglevel 'info'
Browse files Browse the repository at this point in the history
Previously no information at all was logged about the used codec.
  • Loading branch information
gschintgen committed May 11, 2024
1 parent c19b6b6 commit ff04a93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ namespace audio {
opus_multistream_encoder_ctl(opus.get(), OPUS_SET_BITRATE(stream->bitrate));
opus_multistream_encoder_ctl(opus.get(), OPUS_SET_VBR(0));

BOOST_LOG(info) << "Opus initialized: "sv << stream->sampleRate / 1000 << " kHz, "sv
<< stream->channelCount << " channels, "sv
<< stream->bitrate / 1000 << " kbps (total), LOWDELAY"sv;

auto frame_size = config.packetDuration * stream->sampleRate / 1000;
while (auto sample = samples->pop()) {
buffer_t packet { 1400 };
Expand Down

0 comments on commit ff04a93

Please sign in to comment.