Skip to content

Commit

Permalink
roc-streaminggh-688: A bit more conservative defaults for jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Aug 13, 2024
1 parent 7c8b4fd commit 7258781
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
16 changes: 2 additions & 14 deletions src/internal_modules/roc_audio/jitter_meter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,11 @@ namespace roc {
namespace audio {

bool JitterMeterConfig::deduce_defaults(audio::LatencyTunerProfile latency_profile) {
if (jitter_window == 0) {
if (latency_profile == audio::LatencyTunerProfile_Responsive) {
jitter_window = 10000;
} else {
jitter_window = 30000;
}
}

if (peak_quantile_window == 0) {
peak_quantile_window = jitter_window / 5;
}

if (envelope_resistance_coeff == 0) {
if (latency_profile == audio::LatencyTunerProfile_Responsive) {
envelope_resistance_coeff = 0.05;
envelope_resistance_coeff = 0.07;
} else {
envelope_resistance_coeff = 0.1;
envelope_resistance_coeff = 0.10;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/internal_modules/roc_audio/jitter_meter.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ struct JitterMeterConfig {
double peak_quantile_coeff;

JitterMeterConfig()
: jitter_window(0)
: jitter_window(50000)
, envelope_smoothing_window_len(10)
, envelope_resistance_exponent(6)
, envelope_resistance_coeff(0)
, peak_quantile_window(0)
, peak_quantile_coeff(0.90) {
, peak_quantile_window(10000)
, peak_quantile_coeff(0.92) {
}

//! Automatically fill missing settings.
Expand Down
2 changes: 1 addition & 1 deletion src/internal_modules/roc_audio/latency_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ struct LatencyConfig {
, starting_timeout(5 * core::Second)
, cooldown_dec_timeout(5 * core::Second)
, cooldown_inc_timeout(15 * core::Second)
, max_jitter_overhead(1.15f)
, max_jitter_overhead(1.2f)
, mean_jitter_overhead(3.00f) {
}

Expand Down

0 comments on commit 7258781

Please sign in to comment.