Merge pull request #905 from br0xpl/main

Pulseaudio bug when chaning sink/source (between mono and stereo devices).
This commit is contained in:
tobi-wan-kenobi 2022-07-25 09:47:19 +02:00 committed by GitHub
commit b5535fcdc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,9 +146,12 @@ class Module(core.module.Module):
m = re.search(r"mono:.*\s*\/\s*(\d+)%", line) m = re.search(r"mono:.*\s*\/\s*(\d+)%", line)
if m: if m:
self._mono = m.group(1) self._mono = m.group(1)
self._left = 0
self._right = 0
else: else:
m = re.search(r"left:.*\s*\/\s*(\d+)%.*right:.*\s*\/\s*(\d+)%", line) m = re.search(r"left:.*\s*\/\s*(\d+)%.*right:.*\s*\/\s*(\d+)%", line)
if m: if m:
self._mono = 0
self._left = m.group(1) self._left = m.group(1)
self._right = m.group(2) self._right = m.group(2)