Skip to content

Commit

Permalink
Use Opus in the CBR mode.
Browse files Browse the repository at this point in the history
setting VBR to false, and use CBR.
for details see: TokTok#2757
  • Loading branch information
zoff99 committed May 24, 2024
1 parent 158f09e commit 0958770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions amalgamation/toxcore_amalgamation.c
Original file line number Diff line number Diff line change
Expand Up @@ -71724,12 +71724,14 @@ static OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, in
goto FAILURE;
}

#if 0
#if 1
status = opus_encoder_ctl(rc, OPUS_SET_VBR(0));

if (status != OPUS_OK) {
// LOGGER_ERROR(log, "Error while setting encoder ctl: %s", opus_strerror(status));
goto FAILURE;
LOGGER_WARNING(log, "Error while setting encoder ctl (OPUS_SET_VBR off): %s", opus_strerror(status));
// goto FAILURE;
} else {
LOGGER_WARNING(log, "Setting encoder ctl (OPUS_SET_VBR off) OK: %s", opus_strerror(status));
}

#endif
Expand Down
8 changes: 5 additions & 3 deletions toxav/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,14 @@ static OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, in
goto FAILURE;
}

#if 0
#if 1
status = opus_encoder_ctl(rc, OPUS_SET_VBR(0));

if (status != OPUS_OK) {
// LOGGER_ERROR(log, "Error while setting encoder ctl: %s", opus_strerror(status));
goto FAILURE;
LOGGER_WARNING(log, "Error while setting encoder ctl (OPUS_SET_VBR off): %s", opus_strerror(status));
// goto FAILURE;
} else {
LOGGER_WARNING(log, "Setting encoder ctl (OPUS_SET_VBR off) OK: %s", opus_strerror(status));
}

#endif
Expand Down

0 comments on commit 0958770

Please sign in to comment.