]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/commitdiff
Invert no_mixing flag
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 17 Jul 2016 13:19:02 +0000 (15:19 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 17 Jul 2016 13:19:02 +0000 (15:19 +0200)
helpers/__init__.py
helpers/mapping.py
helpers/music_file.py

index 863a23b06cccb0eeb4159ddef6fcaf45ba1da908..ce8f04bf026a55840f2a4b095f9954484c9ef6ea 100644 (file)
@@ -32,9 +32,9 @@ def parse_args():
             default="config.yml",
             required=False,
             help="Config file to load")
-    parser.add_argument("-m", "--no-mixing",
+    parser.add_argument("-m", "--builtin-mixing",
             action="store_true",
-            help="Don't make the mixing of sounds manually and let the sound system do it")
+            help="Make the mixing of sounds manually (do it if the system cannot handle it correctly)")
     parser.add_argument("-l", "--latency",
             default="high",
             required=False,
@@ -83,7 +83,7 @@ def parse_args():
     Config.frame_rate = args.frame_rate
     Config.channels = args.channels
     Config.sample_width = args.sample_width
-    Config.no_mixing = args.no_mixing
+    Config.builtin_mixing = args.builtin_mixing
 
 class SelectDeviceAction(argparse.Action):
     def __call__(self, parser, namespace, values, option_string=None):
index cfc2c3f7546b4dba6afa1f083aacc8ca8c515e05..bc8ccba3a84721e83d6ce96c7b27c668314b57d7 100644 (file)
@@ -17,10 +17,10 @@ class Mapping(RelativeLayout):
     ready_color = ListProperty([1, 165/255, 0, 1])
 
     def __init__(self, **kwargs):
-        if Config.no_mixing:
-            self.mixer = None
-        else:
+        if Config.builtin_mixing:
             self.mixer = Mixer()
+        else:
+            self.mixer = None
         self.key_config, self.open_files = self.parse_config()
         super(Mapping, self).__init__(**kwargs)
         self._keyboard = Window.request_keyboard(self._keyboard_closed, self)
index f391ff4d2dadbf21877add9748b53adea609bb69..efa8628b83c4b078abd6d87b00f30edace769310 100644 (file)
@@ -32,6 +32,7 @@ class MusicFile(Machine):
 
         Machine.__init__(self, states=states, transitions=transitions, initial='initial')
 
+        # FIXME: catch error here
         self.mixer = mapping.mixer or Mixer()
         self.volume = 100
         self.mapping = mapping