We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4de7fd commit 5eb0041Copy full SHA for 5eb0041
1 file changed
sounddevice.py
@@ -59,8 +59,14 @@
59
60
61
try:
62
- _libname = _find_library('portaudio')
63
- if _libname is None:
+ for _libname in (
+ 'portaudio', # Default name on POSIX systems
64
+ 'bin\\libportaudio-2.dll', # DLL from conda-forge
65
+ ):
66
+ _libname = _find_library(_libname)
67
+ if _libname is not None:
68
+ break
69
+ else:
70
raise OSError('PortAudio library not found')
71
_lib = _ffi.dlopen(_libname)
72
except OSError:
@@ -71,8 +77,9 @@
77
else:
78
raise
73
79
import _sounddevice_data
74
- _lib = _ffi.dlopen(_os.path.join(next(iter(_sounddevice_data.__path__)),
75
- 'portaudio-binaries', _libname))
80
+ _libname = _os.path.join(
81
+ next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
82
+ _lib = _ffi.dlopen(_libname)
76
83
84
_sampleformats = {
85
'float32': _lib.paFloat32,
0 commit comments