File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 5959
6060
6161try :
62- _libname = _find_library ('portaudio' )
63- if _libname is None :
62+ for _libname in (
63+ '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 :
6470 raise OSError ('PortAudio library not found' )
6571 _lib = _ffi .dlopen (_libname )
6672except OSError :
7177 else :
7278 raise
7379 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 )
7683
7784_sampleformats = {
7885 'float32' : _lib .paFloat32 ,
You can’t perform that action at this time.
0 commit comments