diff --git a/CHANGELOG.md b/CHANGELOG.md index 090ce2e0..12fa129b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,6 +112,7 @@ https://github.com/librespot-org/librespot from the beginning - [playback] Handle disappearing and invalid devices better - [playback] Handle seek, pause, and play commands while loading +- [playback] Handle disabled normalisation correctly when using fixed volume - [metadata] Fix missing colon when converting named spotify IDs to URIs ## [0.4.2] - 2022-07-29 diff --git a/playback/src/player.rs b/playback/src/player.rs index 3fdf41b7..34a4c5bf 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -1545,9 +1545,11 @@ impl PlayerInternal { // dynamic method, there may still be peaks that we want to shave off. // No matter the case we apply volume attenuation last if there is any. - if !self.config.normalisation && volume < 1.0 { - for sample in data.iter_mut() { - *sample *= volume; + if !self.config.normalisation { + if volume < 1.0 { + for sample in data.iter_mut() { + *sample *= volume; + } } } else if self.config.normalisation_method == NormalisationMethod::Basic && (normalisation_factor < 1.0 || volume < 1.0)