Beispiel #1
0
    def _change_volume(self, step=None, value=None):
        if step is not None:
            volume = sound.get_volume() + step
        elif value is not None:
            volume = value

        volume = min(max(0, volume), _VOLUME_MAX)

        sound.set_volume(volume)
        sound.set_muted(volume == 0)
Beispiel #2
0
    def _change_volume(self, step=None, value=None):
        if step is not None:
            volume = sound.get_volume() + step
        elif value is not None:
            volume = value

        volume = min(max(0, volume), _VOLUME_MAX)

        sound.set_volume(volume)
        sound.set_muted(volume == 0)
Beispiel #3
0
 def _set_level(self, new_volume):
     sound.set_volume(new_volume)
Beispiel #4
0
 def _set_level(self, new_volume):
     sound.set_volume(new_volume)