mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Skip processing when normalisation is disabled
This commit is contained in:
parent
a4ad6d4aa8
commit
9b44fd4f4a
1 changed files with 4 additions and 0 deletions
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue