Multichannel sound problem

I have problem to play multichannel surround sound.

I use 3 speakers with soundblaster x4 driver.
In python cmd, i can play multichannel sound file using sounddevice module
ex) import soundfile as sf
import sounddevice as sd
print(sd.query_devices())
data,fs =sf.read(path+‘\left_footstep 2s.wav’,dtype=‘float32’)
sd.play(data,fs,device=3 )
status=sd.wait()

But, An error occurs when playing a sound file with code in coder or builder (channel error)

Any solution for this?, experts please help

OS (e.g. Win10):
psychopy 23.1.2

Did you make any progress on this? I’m looking to do something similar, also with a soundblaster X4.

Thanks,
John

Hi there,

would you mind sharing the full code you ran together with the exact error message you received? Otherwise, there is a lot of guessing involved. As you stated, sounddevice can play multichannel sound. As stated in the docs, each column of the input array is treated as a channel and the assignment of data to output channels can be controlled with the mapping argument of sounddevice.play(). You typically get a channel-related error message if the number of data channels does not match the output channels of the device.

Best,

Malte