From 92cc4ce2e6d3372c167117c55069cad8a2e69965 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 24 Jun 2016 14:26:44 +0200 Subject: [PATCH] Fix fade_out --- helpers/action.py | 2 +- helpers/music_file.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/action.py b/helpers/action.py index 1cb1686..42a08d0 100644 --- a/helpers/action.py +++ b/helpers/action.py @@ -69,7 +69,7 @@ class Action: music.stop(fade_out = fade_out) else: if fade_out > 0: - pygame.fadeout(fade_out * 1000) + pygame.fadeout(int(fade_out * 1000)) else: pygame.mixer.stop() 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: else: sound = pygame.mixer.Sound(self.raw_data) - self.channel().play(sound, fade_ms = fade_in * 1000) + self.channel().play(sound, fade_ms = int(fade_in * 1000)) self.flag_paused = False def pause(self): @@ -55,7 +55,7 @@ class MusicFile: def stop(self, fade_out = 0): if fade_out > 0: - self.channel().fadeout(fade_out * 1000) + self.channel().fadeout(int(fade_out * 1000)) else: self.channel().stop() -- 2.41.0