Skip to content

Commit e25524c

Browse files
committed
Import _sounddevice_data for locating PortAudio
1 parent 9bbdbff commit e25524c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sounddevice.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@
6767
_libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
6868
else:
6969
raise
70-
_lib = _ffi.dlopen(_os.path.join(
71-
_os.path.dirname(_os.path.abspath(__file__)),
72-
'_sounddevice_data',
73-
_libname
74-
))
70+
import _sounddevice_data
71+
_lib = _ffi.dlopen(
72+
_os.path.join(next(iter(_sounddevice_data.__path__)), _libname))
7573

7674
_sampleformats = {
7775
'float32': _lib.paFloat32,

0 commit comments

Comments
 (0)