2019-04-20 02:29:00 +00:00
|
|
|
diff --git i/sounddevice.py w/sounddevice.py
|
|
|
|
index c7c1d62..aabcb12 100644
|
|
|
|
--- i/sounddevice.py
|
|
|
|
+++ w/sounddevice.py
|
|
|
|
@@ -58,29 +58,7 @@ from ctypes.util import find_library as _find_library
|
2018-07-07 16:46:06 +00:00
|
|
|
from _sounddevice import ffi as _ffi
|
|
|
|
|
|
|
|
|
|
|
|
-try:
|
|
|
|
- for _libname in (
|
|
|
|
- 'portaudio', # Default name on POSIX systems
|
|
|
|
- 'bin\\libportaudio-2.dll', # DLL from conda-forge
|
2019-04-20 02:29:00 +00:00
|
|
|
- 'lib/libportaudio.dylib', # dylib from anaconda
|
2018-07-07 16:46:06 +00:00
|
|
|
- ):
|
|
|
|
- _libname = _find_library(_libname)
|
|
|
|
- if _libname is not None:
|
|
|
|
- break
|
|
|
|
- else:
|
|
|
|
- raise OSError('PortAudio library not found')
|
|
|
|
- _lib = _ffi.dlopen(_libname)
|
|
|
|
-except OSError:
|
|
|
|
- if _platform.system() == 'Darwin':
|
|
|
|
- _libname = 'libportaudio.dylib'
|
|
|
|
- elif _platform.system() == 'Windows':
|
|
|
|
- _libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
|
|
|
|
- else:
|
|
|
|
- raise
|
|
|
|
- import _sounddevice_data
|
|
|
|
- _libname = _os.path.join(
|
|
|
|
- next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
|
|
|
|
- _lib = _ffi.dlopen(_libname)
|
|
|
|
+_lib = _ffi.dlopen('@portaudio@')
|
|
|
|
|
|
|
|
_sampleformats = {
|
|
|
|
'float32': _lib.paFloat32,
|