Exemple #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)
Exemple #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)
Exemple #3
0
 def _set_muted(self, mute):
     sound.set_muted(mute)
Exemple #4
0
 def handle_volume_mute(self, event_time):
     if sound.get_muted() is True:
         sound.set_muted(False)
     else:
         sound.set_muted(True)
Exemple #5
0
 def _set_muted(self, mute):
     sound.set_muted(mute)
Exemple #6
0
 def handle_volume_mute(self, event_time):
     if sound.get_muted() is True:
         sound.set_muted(False)
     else:
         sound.set_muted(True)