]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/music_file.py
Add music-path option to the command line
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / music_file.py
index ba8614204e030423c2aa71baca8b3f084143e759..916b95526fcff251d09717577e2d23a77273e9c3 100644 (file)
@@ -104,7 +104,7 @@ class MusicFile:
                 debug_print("Reloading « {} »".format(self.name))
                 initial_db_gain = gain(self.initial_volume_factor * 100)
                 self.audio_segment = pydub.AudioSegment \
-                        .from_file(self.filename) \
+                        .from_file(Config.music_path + self.filename) \
                         .set_frame_rate(Config.frame_rate) \
                         .set_channels(Config.channels) \
                         .set_sample_width(Config.sample_width) \
@@ -125,7 +125,7 @@ class MusicFile:
                 self.mixer = self.mapping.mixer or Mixer()
                 initial_db_gain = gain(self.initial_volume_factor * 100)
                 self.audio_segment = pydub.AudioSegment \
-                        .from_file(self.filename) \
+                        .from_file(Config.music_path + self.filename) \
                         .set_frame_rate(Config.frame_rate) \
                         .set_channels(Config.channels) \
                         .set_sample_width(Config.sample_width) \