Exemplo n.º 1
0
 def set_input_level(self, level):
     if len(self._input_level_labels) == 0:
         raise OSError("Not supported")
     if level not in self._input_level_labels:
         raise ValueError("Invalid argument for input level.")
     value = self._input_level_labels[level]
     AvcAudio.set_feature_volume_state(self.fcp, 0, "current", 2, 0, value)
Exemplo n.º 2
0
    def _set_state(self, op, fb, ch, value):
        if op == "volume":
            AvcAudio.set_feature_volume_state(self.fcp, 0, "current", fb, ch, value)
        elif op == "mute":

            AvcAudio.set_feature_mute_state(self.fcp, 0, "current", fb, ch, value)
        else:
            raise ValueError("Invalid argument for channel operation")
Exemplo n.º 3
0
 def set_aux_master_volume(self, ch, value):
     if ch > 2:
         raise ValueError('Invalid argument for master channel')
     fb = self._aux_output[self._id]
     AvcAudio.set_feature_volume_state(self.fcp, 0, 'current', fb, ch, value)
Exemplo n.º 4
0
 def _set_volume(self, targets, index, ch, value):
     fb, ch = self._refer_fb_data(targets, index, ch)
     AvcAudio.set_feature_volume_state(self.fcp, 0, 'current', fb, ch, value)