def __server_state_cb(self, obj, dt):
     pypulse.server_info = dt
     self.__fallback_sink_index = pypulse.get_fallback_sink_index()
     if self.__fallback_sink_index in pypulse.output_volumes:
         self.__set_output_status()
     self.__fallback_source_index = pypulse.get_fallback_source_index()
     if self.__fallback_source_index in pypulse.input_volumes:
         self.__set_input_status()
Ejemplo n.º 2
0
 def __server_state_cb(self, obj, dt):
     pypulse.server_info = dt
     self.__fallback_sink_index = pypulse.get_fallback_sink_index()
     if self.__fallback_sink_index in pypulse.output_volumes:
         self.__set_output_status()
     self.__fallback_source_index = pypulse.get_fallback_source_index()
     if self.__fallback_source_index in pypulse.input_volumes:
         self.__set_input_status()
    def __server_state_cb(self, obj, dt):
        pypulse.server_info = dt
        fallback_sink = pypulse.get_fallback_sink_index()
        if self.__fallback_sink_index != fallback_sink:
            self.__fallback_sink_index = fallback_sink
            if self.__fallback_sink_index in pypulse.output_volumes:
                #self.__set_output_status()
                #self.__set_output_port_status()
                #self.__set_output_treeview_status()
                pass

        fallback_source = pypulse.get_fallback_source_index()
        if self.__fallback_source_index is None and fallback_source is None:
            obj.connect_record(self.__record_stream_cb_fun)
        if self.__fallback_source_index != fallback_source:
            self.__fallback_source_index = fallback_source
            obj.connect_record(self.__record_stream_cb_fun)
            if self.__fallback_source_index in pypulse.input_volumes:
                #self.__set_input_status()
                #self.__set_input_port_status()
                #self.__set_input_treeview_status()
                pass
    def __server_state_cb(self, obj, dt):
        pypulse.server_info = dt
        fallback_sink = pypulse.get_fallback_sink_index()
        if self.__fallback_sink_index != fallback_sink:
            self.__fallback_sink_index = fallback_sink
            if self.__fallback_sink_index in pypulse.output_volumes:
                #self.__set_output_status()
                #self.__set_output_port_status()
                #self.__set_output_treeview_status()
                pass

        fallback_source = pypulse.get_fallback_source_index()
        if self.__fallback_source_index is None and fallback_source is None:
            obj.connect_record(self.__record_stream_cb_fun)
        if self.__fallback_source_index != fallback_source:
            self.__fallback_source_index = fallback_source
            obj.connect_record(self.__record_stream_cb_fun)
            if self.__fallback_source_index in pypulse.input_volumes:
                #self.__set_input_status()
                #self.__set_input_port_status()
                #self.__set_input_treeview_status()
                pass