spatialaudio / python-sounddevice

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

Error when ASIO devices use special encoding #490

Closed shoucandanghehe closed 5 months ago

shoucandanghehe commented 10 months ago

The code says All other host APIs use 'utf-8' anyway. This is wrong, for example on my PC there is an ASIO device that uses GBK encoding. b'DSD \xd7\xaa\xc2\xeb\xc6\xf7 (DoP/Native)' https://github.com/spatialaudio/python-sounddevice/blob/791c09db3b187257e53f79725c13c1efdb4ff458/sounddevice.py#L572-L585

btw, in my test, the raise at line 585 doesn't output anything, and I'm not quite sure why. image

mgeier commented 5 months ago

I have merged #512, which hopefully fixes this problem.