From 8b296794feececbbe1a6fe858ff699a8c589fa62 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Mon, 17 Jul 2023 08:47:20 +0100 Subject: [PATCH] Should only decrease the volume after the first tick --- tracker/agb-tracker/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tracker/agb-tracker/src/lib.rs b/tracker/agb-tracker/src/lib.rs index a96cd08c..382db5d8 100644 --- a/tracker/agb-tracker/src/lib.rs +++ b/tracker/agb-tracker/src/lib.rs @@ -196,11 +196,13 @@ impl TrackerChannel { self.volume = *volume; } PatternEffect::VolumeSlide(amount) => { - self.volume += *amount; - if self.volume < 0.into() { - self.volume = 0.into(); + if tick != 0 { + self.volume += *amount; + if self.volume < 0.into() { + self.volume = 0.into(); + } + channel.volume(self.volume); } - channel.volume(self.volume); } } }