From d6290f14246b69e10a73e2798dd3905e866b3e88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= <ismael.bouya@normalesup.org>
Date: Sun, 17 Jul 2016 15:19:02 +0200
Subject: Invert no_mixing flag

---
 helpers/__init__.py   | 6 +++---
 helpers/mapping.py    | 6 +++---
 helpers/music_file.py | 1 +
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/helpers/__init__.py b/helpers/__init__.py
index 863a23b..ce8f04b 100644
--- a/helpers/__init__.py
+++ b/helpers/__init__.py
@@ -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):
diff --git a/helpers/mapping.py b/helpers/mapping.py
index cfc2c3f..bc8ccba 100644
--- a/helpers/mapping.py
+++ b/helpers/mapping.py
@@ -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)
diff --git a/helpers/music_file.py b/helpers/music_file.py
index f391ff4..efa8628 100644
--- a/helpers/music_file.py
+++ b/helpers/music_file.py
@@ -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
-- 
cgit v1.2.3