diff --git a/.github/workflows/sounddevice-data.yml b/.github/workflows/sounddevice-data.yml index 5bdfaad..a566835 100644 --- a/.github/workflows/sounddevice-data.yml +++ b/.github/workflows/sounddevice-data.yml @@ -16,6 +16,8 @@ jobs: arch: 'x86' - os: windows-11-arm arch: 'arm64' + - os: windows-11-arm + arch: 'x64' runs-on: ${{ matrix.os }} steps: - name: Set up Python @@ -25,7 +27,7 @@ jobs: architecture: ${{ matrix.arch }} - name: Double-check Python version run: | - python --version + python --version --version - name: Clone Git repository (with submodules) uses: actions/checkout@v6 with: diff --git a/src/sounddevice.py b/src/sounddevice.py index 00fc6f8..4361c62 100644 --- a/src/sounddevice.py +++ b/src/sounddevice.py @@ -75,10 +75,16 @@ if _platform.system() == 'Darwin': _libname = 'libportaudio.dylib' elif _platform.system() == 'Windows': - if _platform.machine().lower() in ('arm64', 'aarch64'): - _platform_suffix = 'arm64' - else: - _platform_suffix = _platform.architecture()[0] + _platform_suffix = { + 'AMD64': '64bit', + 'x86': '32bit', + 'ARM64': 'arm64', + }.get(_os.environ.get('PROCESSOR_ARCHITECTURE', ''), '') + if not _platform_suffix: + if _platform.machine().lower() in ('arm64', 'aarch64'): + _platform_suffix = 'arm64' + else: + _platform_suffix = _platform.architecture()[0] if 'SD_ENABLE_ASIO' in _os.environ: _libname = 'libportaudio' + _platform_suffix + '-asio.dll' else: