spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
980 stars 145 forks source link

how to playback audios with 4 loudspeakers by useing “sounddevic.play()”? #439

Open SoulProficiency opened 1 year ago

SoulProficiency commented 1 year ago

good day,my bro! i just want to playback some audios and meet some probles,to be specific,could you tell us the usage of sounddevic.play(,,mapping=), especially the "mapping=". thanks a lot!

HaHeho commented 1 year ago

According to the documentation the function takes a list of integers starting from 1. Something like mapping=[1, 2, 3, 4] could play a mono-file to the first four output channels of your device. If not mono, the audio file would also have to have four channels.

Otherwise it is difficult to help without a minimum working code example.