summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2018-05-03 11:11:13 +0200
committerMatthias Geier <Matthias.Geier@gmail.com>2018-05-03 11:11:13 +0200
commit7f625dc718670e5a5014e7ffa7cf653531b10791 (patch)
tree6a1b1a24e1d4aa8fa9d7477abdca94d4fe44d509
parent52d025e2754d7d2121326b9e02d8ca7d1fed5e2c (diff)
play() etc.: force a copy of "mapping"
Fixes #135.
-rw-r--r--sounddevice.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sounddevice.py b/sounddevice.py
index c9c8117..54f521a 100644
--- a/sounddevice.py
+++ b/sounddevice.py
@@ -2446,6 +2446,7 @@ def _check_mapping(mapping, channels):
if mapping is None:
mapping = np.arange(channels)
else:
+ mapping = np.array(mapping, copy=True)
mapping = np.atleast_1d(mapping)
if mapping.min() < 1:
raise ValueError('channel numbers must not be < 1')