mirror of
https://github.com/larsimmisch/pyalsaaudio.git
synced 2026-05-10 17:58:01 +00:00
Small improvement to VolumeForwarder
This commit is contained in:
committed by
Oswald Buddenhagen
parent
24eef474da
commit
bdca4dc061
@@ -86,8 +86,8 @@ class VolumeForwarder(object):
|
|||||||
|
|
||||||
def __call__(self, fd, eventmask, name):
|
def __call__(self, fd, eventmask, name):
|
||||||
volume = self.capture_control.getvolume(pcmtype=PCM_CAPTURE)
|
volume = self.capture_control.getvolume(pcmtype=PCM_CAPTURE)
|
||||||
# it looks as if we need to get the playback volume to reset the event
|
# indicate that we've handled the event
|
||||||
self.capture_control.getvolume()
|
self.capture_control.handleevents()
|
||||||
logging.info(f'{name} adjusting volume to {volume}')
|
logging.info(f'{name} adjusting volume to {volume}')
|
||||||
if volume:
|
if volume:
|
||||||
self.playback_control.setvolume(volume[0])
|
self.playback_control.setvolume(volume[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user