def delete(self): '''Completely shut down pulseaudio client.''' self.lock() pa.pa_context_unref(self._context) self.unlock() pa.pa_threaded_mainloop_stop(self.threaded_mainloop) pa.pa_threaded_mainloop_free(self.threaded_mainloop) self.threaded_mainloop = None self.mainloop = None
def delete(self): """Completely shut down pulseaudio client.""" with self.lock: pa.pa_context_disconnect(self._context) pa.pa_context_unref(self._context) pa.pa_threaded_mainloop_stop(self.threaded_mainloop) pa.pa_threaded_mainloop_free(self.threaded_mainloop) self.lock = None self.threaded_mainloop = None self.mainloop = None