From 425dd061bf64a8304ec96aec870b0e2e24fa44f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 21 Jun 2016 10:50:59 +0200 Subject: [PATCH] Fix frame rate when importing music --- helpers/music_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/music_file.py b/helpers/music_file.py index d40a132..cdc9836 100644 --- a/helpers/music_file.py +++ b/helpers/music_file.py @@ -17,7 +17,7 @@ class MusicFile: def load_sound(self, lock): lock.acquire() print("Loading « {} »".format(self.name)) - self.raw_data = pydub.AudioSegment.from_file(self.filename).raw_data + self.raw_data = pydub.AudioSegment.from_file(self.filename).set_frame_rate(44100).raw_data self.sound = pygame.mixer.Sound(self.raw_data) print("Loaded « {} »".format(self.name)) self.loaded = True -- 2.41.0