diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-25 16:53:46 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-25 16:53:46 +0200 |
commit | 205861936ca55357beea6a8af7c0c9ed5a61f484 (patch) | |
tree | 2c9711c256013ba0b6911e6c5f05a79cd549172d /helpers/mapping.py | |
parent | 9c4f705fc6e8ef19973c1977ae8a5b9982cf6ecc (diff) | |
download | MusicSampler-205861936ca55357beea6a8af7c0c9ed5a61f484.tar.gz MusicSampler-205861936ca55357beea6a8af7c0c9ed5a61f484.tar.zst MusicSampler-205861936ca55357beea6a8af7c0c9ed5a61f484.zip |
Reorder MusicFile methods
Diffstat (limited to 'helpers/mapping.py')
-rw-r--r-- | helpers/mapping.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/helpers/mapping.py b/helpers/mapping.py index d60e709..c2a94e6 100644 --- a/helpers/mapping.py +++ b/helpers/mapping.py | |||
@@ -10,7 +10,6 @@ import sys | |||
10 | from .music_file import * | 10 | from .music_file import * |
11 | from .mixer import Mixer | 11 | from .mixer import Mixer |
12 | from . import Config, gain, error_print | 12 | from . import Config, gain, error_print |
13 | from .music_effect import GainEffect | ||
14 | from .action import Action | 13 | from .action import Action |
15 | 14 | ||
16 | class Mapping(RelativeLayout): | 15 | class Mapping(RelativeLayout): |
@@ -47,19 +46,7 @@ class Mapping(RelativeLayout): | |||
47 | self.master_volume) | 46 | self.master_volume) |
48 | 47 | ||
49 | for music in self.open_files.values(): | 48 | for music in self.open_files.values(): |
50 | if not (music.is_loaded_playing() or music.is_loaded_paused()): | 49 | music.set_gain_with_effect(db_gain, fade=fade) |
51 | continue | ||
52 | |||
53 | if fade > 0: | ||
54 | music.gain_effects.append(GainEffect( | ||
55 | "fade", | ||
56 | music.current_audio_segment, | ||
57 | music.current_loop, | ||
58 | music.sound_position, | ||
59 | music.sound_position + fade, | ||
60 | gain=db_gain)) | ||
61 | else: | ||
62 | music.set_gain(db_gain) | ||
63 | 50 | ||
64 | def add_wait_id(self, wait_id, action_or_wait): | 51 | def add_wait_id(self, wait_id, action_or_wait): |
65 | self.wait_ids[wait_id] = action_or_wait | 52 | self.wait_ids[wait_id] = action_or_wait |