mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Attenuate after normalisation
This commit is contained in:
parent
1540636ccc
commit
7da4d0e473
1 changed files with 4 additions and 4 deletions
|
@ -1186,10 +1186,6 @@ impl PlayerInternal {
|
||||||
Some(mut packet) => {
|
Some(mut packet) => {
|
||||||
if !packet.is_empty() {
|
if !packet.is_empty() {
|
||||||
if let AudioPacket::Samples(ref mut data) = packet {
|
if let AudioPacket::Samples(ref mut data) = packet {
|
||||||
if let Some(ref editor) = self.audio_filter {
|
|
||||||
editor.modify_stream(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
if self.config.normalisation
|
if self.config.normalisation
|
||||||
&& !(f64::abs(normalisation_factor - 1.0) <= f64::EPSILON
|
&& !(f64::abs(normalisation_factor - 1.0) <= f64::EPSILON
|
||||||
&& self.config.normalisation_method == NormalisationMethod::Basic)
|
&& self.config.normalisation_method == NormalisationMethod::Basic)
|
||||||
|
@ -1302,6 +1298,10 @@ impl PlayerInternal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(ref editor) = self.audio_filter {
|
||||||
|
editor.modify_stream(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(err) = self.sink.write(&packet, &mut self.converter) {
|
if let Err(err) = self.sink.write(&packet, &mut self.converter) {
|
||||||
|
|
Loading…
Reference in a new issue