Should only decrease the volume after the first tick

This commit is contained in:
Gwilym Inzani 2023-07-17 08:47:20 +01:00
parent 652173c08e
commit 8b296794fe

View file

@ -196,11 +196,13 @@ impl TrackerChannel {
self.volume = *volume; self.volume = *volume;
} }
PatternEffect::VolumeSlide(amount) => { PatternEffect::VolumeSlide(amount) => {
self.volume += *amount; if tick != 0 {
if self.volume < 0.into() { self.volume += *amount;
self.volume = 0.into(); if self.volume < 0.into() {
self.volume = 0.into();
}
channel.volume(self.volume);
} }
channel.volume(self.volume);
} }
} }
} }