diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2017-11-14 11:47:25 +0100 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2017-11-18 12:44:42 +0100 |
| commit | 9bd46dc4333eb9be01f8d4b51df2292f757f9288 (patch) | |
| tree | b083747f51b304ae46522a36d9b8dc05e53fb18f /src/sounddevice.py | |
| parent | 2f8bc04032a355f04488f5c9e91f80f073564a40 (diff) | |
Raise a meaningful exception if PortAudio is not found
Diffstat (limited to 'src/sounddevice.py')
| -rw-r--r-- | src/sounddevice.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sounddevice.py b/src/sounddevice.py index 3cf4d52..db24476 100644 --- a/src/sounddevice.py +++ b/src/sounddevice.py @@ -59,7 +59,10 @@ from _sounddevice import ffi as _ffi try: - _lib = _ffi.dlopen(_find_library('portaudio')) + _libname = _find_library('portaudio') + if _libname is None: + raise OSError('PortAudio library not found') + _lib = _ffi.dlopen(_libname) except OSError: if _platform.system() == 'Darwin': _libname = 'libportaudio.dylib' |
