From: Ismaƫl Bouya Date: Fri, 22 Jul 2016 21:41:03 +0000 (+0200) Subject: Fix setting volume when not playing X-Git-Tag: 1.0.0~31 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git;a=commitdiff_plain;h=55e4cf3531983d7d334d0477687a4e7ea77931a9 Fix setting volume when not playing --- diff --git a/helpers/music_file.py b/helpers/music_file.py index b26a1be..5f4fe76 100644 --- a/helpers/music_file.py +++ b/helpers/music_file.py @@ -289,6 +289,9 @@ class MusicFile(Machine): value + int(delta) * self.volume, self.volume) + if not (self.is_loaded_playing() or self.is_loaded_paused()): + return + if fade > 0: self.gain_effects.append(GainEffect( "fade",