diff options
| -rw-r--r-- | sounddevice.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sounddevice.py b/sounddevice.py index 3f34989..65ac26c 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -2461,6 +2461,9 @@ class _CallbackContext(object): data = np.asarray(data) if data.ndim < 2: data = data.reshape(-1, 1) + elif data.ndim > 2: + raise ValueError( + 'audio data to be played back must be one- or two-dimensional') frames, channels = data.shape dtype = _check_dtype(data.dtype) mapping_is_explicit = mapping is not None |
