constant bitrate for audio
This commit is contained in:
parent
76f34be395
commit
9e03cdda42
1 changed files with 2 additions and 0 deletions
|
|
@ -85,6 +85,8 @@ void encodeThread(packet_queue_t packets, sample_queue_t samples, config_t confi
|
||||||
OPUS_APPLICATION_AUDIO,
|
OPUS_APPLICATION_AUDIO,
|
||||||
nullptr) };
|
nullptr) };
|
||||||
|
|
||||||
|
opus_multistream_encoder_ctl(opus.get(), OPUS_SET_VBR(0));
|
||||||
|
|
||||||
auto frame_size = config.packetDuration * stream->sampleRate / 1000;
|
auto frame_size = config.packetDuration * stream->sampleRate / 1000;
|
||||||
while(auto sample = samples->pop()) {
|
while(auto sample = samples->pop()) {
|
||||||
packet_t packet { 1024 }; // 1KB
|
packet_t packet { 1024 }; // 1KB
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue