]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/commitdiff
Fix setting volume when not playing
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 22 Jul 2016 21:41:03 +0000 (23:41 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 22 Jul 2016 21:41:03 +0000 (23:41 +0200)
helpers/music_file.py

index b26a1beea56fdcdd440b6f66539d60ec2657d02e..5f4fe764469c0b660b00754c5485b8fdd2ec798f 100644 (file)
@@ -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",