From 9b44fd4f4a69f9d5c0f5e42d4f97157bfc1fe047 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Mon, 17 May 2021 21:27:34 +0200 Subject: [PATCH] Skip processing when normalisation is disabled --- playback/src/player.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playback/src/player.rs b/playback/src/player.rs index f5f3ab66..8cbb4372 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -233,6 +233,10 @@ impl NormalisationData { } fn get_factor(config: &PlayerConfig, data: NormalisationData) -> f32 { + if !config.normalisation { + return 1.0; + } + let [gain_db, gain_peak] = match config.normalisation_type { NormalisationType::Album => [data.album_gain_db, data.album_peak], NormalisationType::Track => [data.track_gain_db, data.track_peak],