Skip to content

Commit 8c7da87

Browse files
authored
Merge pull request #139 from shithead/shithead-patch-pulse-library-name
Try explicit file name, if the general does not work (e.g. on nixos)
2 parents 754d915 + 512527b commit 8c7da87

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 OSError:
19+
# Try explicit file name, if the general does not work (e.g. on nixos)
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)