aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-21 10:50:59 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-21 10:50:59 +0200
commit425dd061bf64a8304ec96aec870b0e2e24fa44f4 (patch)
treea9d71c92501b9933c68fbac30c28694ec71b95a7
parentd05b1117dfb842959f89797174718ab58d04dd77 (diff)
downloadMusicSampler-425dd061bf64a8304ec96aec870b0e2e24fa44f4.tar.gz
MusicSampler-425dd061bf64a8304ec96aec870b0e2e24fa44f4.tar.zst
MusicSampler-425dd061bf64a8304ec96aec870b0e2e24fa44f4.zip
Fix frame rate when importing music
-rw-r--r--helpers/music_file.py2
1 files changed, 1 insertions, 1 deletions
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:
17 def load_sound(self, lock): 17 def load_sound(self, lock):
18 lock.acquire() 18 lock.acquire()
19 print("Loading « {} »".format(self.name)) 19 print("Loading « {} »".format(self.name))
20 self.raw_data = pydub.AudioSegment.from_file(self.filename).raw_data 20 self.raw_data = pydub.AudioSegment.from_file(self.filename).set_frame_rate(44100).raw_data
21 self.sound = pygame.mixer.Sound(self.raw_data) 21 self.sound = pygame.mixer.Sound(self.raw_data)
22 print("Loaded « {} »".format(self.name)) 22 print("Loaded « {} »".format(self.name))
23 self.loaded = True 23 self.loaded = True