diff --git a/pulsemixer b/pulsemixer index 6b0c8c6..985d9d6 100755 --- a/pulsemixer +++ b/pulsemixer @@ -47,7 +47,10 @@ from unicodedata import east_asian_width # v bindings try: - DLL = CDLL("libpulse.so.0") + if sys.platform == "darwin": + DLL = CDLL("libpulse.dylib") + else: + DLL = CDLL("libpulse.so.0") except Exception as e: sys.exit(e) @@ -937,7 +940,10 @@ class Bar(): self.name = pa return if type(pa) in (PulseSinkInfo, PulseSourceInfo, PulseCard): - self.fullname = pa.description.decode() + if pa.description: + self.fullname = pa.description.decode() + else: + self.fullname = pa.name.decode() else: self.fullname = pa.client.name.decode() self.name = re.sub(r'^ALSA plug-in \[|\]$', '', self.fullname.replace('|', ' '))