mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Respect disabled normalisation with maximum volume (#1159)
This commit is contained in:
parent
03b547d3b3
commit
31d18f7e30
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -1545,10 +1545,12 @@ 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 {
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue