diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-22 23:41:03 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-22 23:41:03 +0200 |
commit | 55e4cf3531983d7d334d0477687a4e7ea77931a9 (patch) | |
tree | d290771448a2d459ef30097d5763d9243e9f0847 | |
parent | 513226699e5cb5776bd71ee6bb2ada87a43c4dee (diff) | |
download | MusicSampler-55e4cf3531983d7d334d0477687a4e7ea77931a9.tar.gz MusicSampler-55e4cf3531983d7d334d0477687a4e7ea77931a9.tar.zst MusicSampler-55e4cf3531983d7d334d0477687a4e7ea77931a9.zip |
Fix setting volume when not playing
-rw-r--r-- | helpers/music_file.py | 3 |
1 files changed, 3 insertions, 0 deletions
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): | |||
289 | value + int(delta) * self.volume, | 289 | value + int(delta) * self.volume, |
290 | self.volume) | 290 | self.volume) |
291 | 291 | ||
292 | if not (self.is_loaded_playing() or self.is_loaded_paused()): | ||
293 | return | ||
294 | |||
292 | if fade > 0: | 295 | if fade > 0: |
293 | self.gain_effects.append(GainEffect( | 296 | self.gain_effects.append(GainEffect( |
294 | "fade", | 297 | "fade", |