]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/mixer.py
Coding styles
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / mixer.py
index d08520a00cf7c3197ff63e37ec2c68d503addf58..1d3f28fe21fb33e4986d829d154df822b81a6206 100644 (file)
@@ -5,6 +5,7 @@ import time
 from . import Config
 
 sample_width = Config.sample_width
+
 def sample_width_to_dtype(sample_width):
     if sample_width == 1 or sample_width == 2 or sample_width == 4:
         return 'int' + str(8*sample_width)
@@ -19,13 +20,13 @@ def _latency(latency):
 
 class Mixer:
     def __init__(self):
-        self.stream = sd.RawOutputStream(samplerate=Config.frame_rate,
-                        channels=Config.channels,
-                        dtype=sample_width_to_dtype(Config.sample_width),
-                        latency=_latency(Config.latency),
-                        blocksize=Config.blocksize,
-                        callback=self.play_callback,
-                        )
+        self.stream = sd.RawOutputStream(
+                samplerate=Config.frame_rate,
+                channels=Config.channels,
+                dtype=sample_width_to_dtype(Config.sample_width),
+                latency=_latency(Config.latency),
+                blocksize=Config.blocksize,
+                callback=self.play_callback)
         self.open_files = []
 
     def add_file(self, music_file):