summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2017-11-12 11:32:12 +0100
committerMatthias Geier <Matthias.Geier@gmail.com>2017-11-12 11:32:12 +0100
commite25524cd32c4205c7cf86a967c9f63b332c9f3bb (patch)
tree77141bc2af5e68a4cb7a82fc9306c5edb0094959
parent9bbdbff88e4f545dae01896f8104022e744f8bfa (diff)
Import _sounddevice_data for locating PortAudio
-rw-r--r--src/sounddevice.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sounddevice.py b/src/sounddevice.py
index d660651..7ca9d43 100644
--- a/src/sounddevice.py
+++ b/src/sounddevice.py
@@ -67,11 +67,9 @@ except OSError:
_libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
else:
raise
- _lib = _ffi.dlopen(_os.path.join(
- _os.path.dirname(_os.path.abspath(__file__)),
- '_sounddevice_data',
- _libname
- ))
+ import _sounddevice_data
+ _lib = _ffi.dlopen(
+ _os.path.join(next(iter(_sounddevice_data.__path__)), _libname))
_sampleformats = {
'float32': _lib.paFloat32,