diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-21 09:26:20 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-21 09:26:20 +0200 |
commit | a8340c5d43bcfc3d78c2e00ab26c0596d7ffe85e (patch) | |
tree | 0142753a5c6f8ce25ec2c456309b96c6e721d485 /helpers/action.py | |
parent | 9925ce3b588fc449a3e0f5a6506a2d29207928d3 (diff) | |
download | MusicSampler-a8340c5d43bcfc3d78c2e00ab26c0596d7ffe85e.tar.gz MusicSampler-a8340c5d43bcfc3d78c2e00ab26c0596d7ffe85e.tar.zst MusicSampler-a8340c5d43bcfc3d78c2e00ab26c0596d7ffe85e.zip |
Handle fade for master volume
Diffstat (limited to 'helpers/action.py')
-rw-r--r-- | helpers/action.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers/action.py b/helpers/action.py index b8e44e6..247e0a9 100644 --- a/helpers/action.py +++ b/helpers/action.py | |||
@@ -106,7 +106,7 @@ class Action: | |||
106 | if music is not None: | 106 | if music is not None: |
107 | music.set_volume(value, delta=delta, fade=fade) | 107 | music.set_volume(value, delta=delta, fade=fade) |
108 | else: | 108 | else: |
109 | self.mapping.set_master_volume(value, delta=delta) | 109 | self.mapping.set_master_volume(value, delta=delta, fade=fade) |
110 | 110 | ||
111 | def wait(self, duration=0, music=None, **kwargs): | 111 | def wait(self, duration=0, music=None, **kwargs): |
112 | self.sleep_event = threading.Event() | 112 | self.sleep_event = threading.Event() |
@@ -210,7 +210,7 @@ class Action: | |||
210 | message += "setting volume to {}%" \ | 210 | message += "setting volume to {}%" \ |
211 | .format(value) | 211 | .format(value) |
212 | 212 | ||
213 | if music is not None and fade > 0: | 213 | if fade > 0: |
214 | message += " with {}s fade".format(fade) | 214 | message += " with {}s fade".format(fade) |
215 | 215 | ||
216 | return message | 216 | return message |