You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PortAudio DLL selection picks arm64 on Windows-on-ARM even when Python is x86_64 #639
On Windows-on-ARM with an x86_64 Python (the default python.org installer), sounddevice.py picks libportaudioarm64.dll because it reads platform.machine(), which describes the OS, not the process. An x86_64 process cannot load an ARM64 DLL, so import fails with OSError: ... error 0xc1 (ERROR_BAD_EXE_FORMAT).
Repro: python -c "import sounddevice" on Windows 11 ARM64 with Python 3.14.3 x86_64, sounddevice 0.5.5.
Root cause: the elif _platform.system() == 'Windows': branch (~line 78) uses platform.machine() alone.
Fix: gate the arm64 branch on the process being ARM64 too — parse the compiler tag in sys.version (AMD64 vs ARM64), or try libportaudio64bit.dll first and only fall back to the arm64 name for an ARM64-native process.
Activity
mgeier commentedon Aug 17, 2026
Thanks for the report!
I just released version 0.5.6, which should fix this (see #631). Can you please check it out?
kaizhengnz commentedon Aug 17, 2026
Good job mate, thanks!