This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pulsectl import Pulse, PulseVolumeInfo | |
def setVolume(vol): | |
with Pulse('volume-example') as pulse: | |
print(vol) | |
for sink in pulse.sink_list(): | |
# Volume is usually in 0-1.0 range, with >1.0 being soft-boosted | |
pulse.volume_set_all_chans(sink, vol) | |