コード例 #1
0
 def __source_state_cb(self, obj, channel, port, volume, source, idx):
     pypulse.input_channels[idx] = channel
     pypulse.input_active_ports[idx] = port
     pypulse.input_volumes[idx] = volume
     pypulse.input_devices[idx] = source
     if self.__fallback_source_index is None and pypulse.get_fallback_source_name() == source['name']:
         self.__fallback_source_index = idx
     if self.__fallback_source_index == idx:
         self.__set_input_status()
コード例 #2
0
 def __source_state_cb(self, obj, channel, port, volume, source, idx):
     pypulse.input_channels[idx] = channel
     pypulse.input_active_ports[idx] = port
     pypulse.input_volumes[idx] = volume
     pypulse.input_devices[idx] = source
     if self.__fallback_source_index is None and pypulse.get_fallback_source_name(
     ) == source['name']:
         self.__fallback_source_index = idx
     if self.__fallback_source_index == idx:
         self.__set_input_status()
コード例 #3
0
 def __source_state_cb(self, obj, channel, port, volume, source, idx):
     if idx in pypulse.input_devices:
         op = "changed"
     else:
         op = "new"
     pypulse.input_channels[idx] = channel
     pypulse.input_active_ports[idx] = port
     pypulse.input_volumes[idx] = volume
     pypulse.input_devices[idx] = source
     if self.__fallback_source_index is None and pypulse.get_fallback_source_name() == source['name']:
         self.__fallback_source_index = idx
     if self.__fallback_source_index == idx:
         #self.__set_input_status()
         #self.__set_input_port_status()
         pass
     if op == "new":
         #self.__set_input_treeview_status()
         pass
コード例 #4
0
 def __source_state_cb(self, obj, channel, port, volume, source, idx):
     if idx in pypulse.input_devices:
         op = "changed"
     else:
         op = "new"
     pypulse.input_channels[idx] = channel
     pypulse.input_active_ports[idx] = port
     pypulse.input_volumes[idx] = volume
     pypulse.input_devices[idx] = source
     if self.__fallback_source_index is None and pypulse.get_fallback_source_name(
     ) == source['name']:
         self.__fallback_source_index = idx
     if self.__fallback_source_index == idx:
         #self.__set_input_status()
         #self.__set_input_port_status()
         pass
     if op == "new":
         #self.__set_input_treeview_status()
         pass