Ejemplo n.º 1
0
    def exit(self):
        self.unload_sinks()
        self.log.info('sinks unloaded')

        self.log.info('disconnecting pulseaudio context')
        p.pa_context_disconnect(self.ctx)

        while self.context_ok:
            pass

        self.log.info('stopping pulseaudio threaded main loop')
        p.pa_threaded_mainloop_stop(self.main_loop)

        self.log.info('freeing pulseaudio main loop object')
        p.pa_threaded_mainloop_free(self.main_loop)
Ejemplo n.º 2
0
    def exit(self):
        self.unload_sinks()
        self.log.debug(self.log_tag + 'sinks unloaded')

        self.drain_ctx()

        self.log.debug(self.log_tag + 'disconnecting pulseaudio context')
        p.pa_context_disconnect(self.ctx)

        self.event_ctx_terminated.wait()

        self.log.debug(self.log_tag + 'unferencing pulseaudio context object')
        p.pa_context_unref(self.ctx)

        self.log.debug(self.log_tag + 'stopping pulseaudio threaded main loop')
        p.pa_threaded_mainloop_stop(self.main_loop)

        self.log.debug(self.log_tag + 'freeing pulseaudio main loop object')
        p.pa_threaded_mainloop_free(self.main_loop)
Ejemplo n.º 3
0
 def context_disconnect(self):
     p.pa_context_disconnect(self.ctx)