Compare commits

..

No commits in common. "3bdf262068bfb6cf5bef58172447acfbc0f47001" and "86ce199ac8c1c85a84d832fb576296ba2d3adfb5" have entirely different histories.

2 changed files with 2 additions and 22 deletions

View File

@ -377,21 +377,6 @@ static OpusEncoder *create_audio_encoder(const Logger *log, uint32_t bit_rate, u
goto FAILURE;
}
/*
* The libopus library defaults to VBR, which is unsafe in any VoIP environment
* (see for example doi:10.1109/SP.2011.34). Switching to CBR very slightly
* decreases audio quality at lower bitrates.
*
* Parameters:
* `[in]` `x` `opus_int32`: Whether to use VBR mode, 1 (VBR) is default
*/
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;
}
/*
* Configures the encoder's use of inband forward error correction.
* Note:

View File

@ -1042,16 +1042,11 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
float fraction = float(total) / total_size;
char overlay_buf[64];
char overlay_buf[32];
if (rate > 0.000001f) {
const char* byte_suffix = "???";
int64_t byte_divider = sizeToHumanReadable(rate, byte_suffix);
int64_t seconds_remaining = (total_size - total) / rate;
if (seconds_remaining > 0) {
std::snprintf(overlay_buf, sizeof(overlay_buf), "%.1f%% @ %.1f%s/s %lds ", fraction * 100 + 0.01f, rate/byte_divider, byte_suffix, seconds_remaining);
} else {
std::snprintf(overlay_buf, sizeof(overlay_buf), "%.1f%% @ %.1f%s/s", fraction * 100 + 0.01f, rate/byte_divider, byte_suffix);
}
} else {
std::snprintf(overlay_buf, sizeof(overlay_buf), "%.1f%%", fraction * 100 + 0.01f);
}