Multichannel Sound Syncronization Issues In Python (sounddevice)
Solution 1:
It's very hard (most likely impossible) to synchronize different streams. You should use only one Stream
(or OutputStream
) object at a time. Handling 8 channels in a single stream shouldn't be a problem.
You can use the play() function with 8 channels, or you can create a custom callback function that handles your 8 channels, and use it in a Stream or OutputStream.
UPDATE:
It is not possible to use multiple devices in a stream, see also issue 29 on Github. You can try using a different host API. Do you have an ASIO driver for your sound card? With ASIO you typically get one device with multiple channels. If that doesn't work, you can try to ask on the PortAudio mailing list.
The input data should be a 2-dimensional NumPy array with one column per channel. Have a look at the documentation of the callback
parameter of the Stream class.
Post a Comment for "Multichannel Sound Syncronization Issues In Python (sounddevice)"