Skip to content

Commit 5d59816

Browse files
author
Bastian Bechtold
committed
x64 fixed, when running on arm64 Windows
x64 python, running on arm64 Windows, reports the exact same architecture and platform as arm64 python running on arm64 Windows. We can not distinguish between them here. For now, neither, numpy nor CFFI support arm64 python on Windows, so we can simply ignore it. This is ugly.
1 parent 80c62b8 commit 5d59816

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

soundfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,11 @@
158158
elif _sys.platform == 'win32':
159159
from platform import architecture as _architecture
160160
from platform import machine as _machine
161-
if _machine() == 'ARM64':
162-
_packaged_libname = 'libsndfile_arm64.dll'
163-
elif _architecture()[0] == '64bit':
161+
# this check can not be completed correctly: for x64 binaries running on
162+
# arm64 Windows report the same values as arm64 binaries. For now, neither
163+
# numpy nor cffi are available for arm64, so we can safely assume we're
164+
# in x86 land:
165+
if _architecture()[0] == '64bit':
164166
_packaged_libname = 'libsndfile_x64.dll'
165167
elif _architecture()[0] == '32bit':
166168
_packaged_libname = 'libsndfile_x86.dll'

0 commit comments

Comments
 (0)