aboutsummaryrefslogtreecommitdiff
path: root/helpers/music_file.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-24 14:26:44 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-24 14:26:44 +0200
commit92cc4ce2e6d3372c167117c55069cad8a2e69965 (patch)
treec6db4c0aeb9288f1ff5a203be78604530e23166e /helpers/music_file.py
parentb58b8220c1f3f20e97ca806cf8db0e334b920f4c (diff)
downloadMusicSampler-92cc4ce2e6d3372c167117c55069cad8a2e69965.tar.gz
MusicSampler-92cc4ce2e6d3372c167117c55069cad8a2e69965.tar.zst
MusicSampler-92cc4ce2e6d3372c167117c55069cad8a2e69965.zip
Fix fade_out
Diffstat (limited to 'helpers/music_file.py')
-rw-r--r--helpers/music_file.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers/music_file.py b/helpers/music_file.py
index 1078459..667c169 100644
--- a/helpers/music_file.py
+++ b/helpers/music_file.py
@@ -42,7 +42,7 @@ class MusicFile:
42 else: 42 else:
43 sound = pygame.mixer.Sound(self.raw_data) 43 sound = pygame.mixer.Sound(self.raw_data)
44 44
45 self.channel().play(sound, fade_ms = fade_in * 1000) 45 self.channel().play(sound, fade_ms = int(fade_in * 1000))
46 self.flag_paused = False 46 self.flag_paused = False
47 47
48 def pause(self): 48 def pause(self):
@@ -55,7 +55,7 @@ class MusicFile:
55 55
56 def stop(self, fade_out = 0): 56 def stop(self, fade_out = 0):
57 if fade_out > 0: 57 if fade_out > 0:
58 self.channel().fadeout(fade_out * 1000) 58 self.channel().fadeout(int(fade_out * 1000))
59 else: 59 else:
60 self.channel().stop() 60 self.channel().stop()
61 61