Skip to content

Commit 64d869e

Browse files
authored
explicite sharde object name on linux sytems
On Nixos 21.04 need a explicite name to load pulse library
1 parent 754d915 commit 64d869e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

soundcard/pulseaudio.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
with open(os.path.join(_package_dir, 'pulseaudio.py.h'), 'rt') as f:
1414
_ffi.cdef(f.read())
1515

16-
_pa = _ffi.dlopen('pulse')
17-
16+
try:
17+
_pa = _ffi.dlopen('pulse')
18+
except:
19+
# Need sometimes explicite sharedobject name on Linux
20+
_pa = _ffi.dlopen('libpulse.so')
21+
1822
# First, we need to define a global _PulseAudio proxy for interacting
1923
# with the C API:
2024

0 commit comments

Comments
 (0)