func (self *PulseStream) ConnectToSink() int { C.pa_threaded_mainloop_lock(self.Context.MainLoop.pa) err := C.pa_stream_connect_playback(self.st, nil, nil, 0, nil, nil) C.pa_threaded_mainloop_unlock(self.Context.MainLoop.pa) if err == OK { err = C.stream_poll_unless(self.Context.MainLoop.pa, self.st, STREAM_READY) } return int(err) }
func (self *PulseContext) Disconnect() { C.pa_threaded_mainloop_lock(self.MainLoop.pa) C.pa_context_disconnect(self.ctx) C.pa_threaded_mainloop_unlock(self.MainLoop.pa) }
func (self *PulseStream) Disconnect() { C.pa_threaded_mainloop_lock(self.Context.MainLoop.pa) C.pa_stream_disconnect(self.st) C.pa_threaded_mainloop_unlock(self.Context.MainLoop.pa) }
// Acquire an exclusive lock on the mainloop // func (self *Client) Lock() { if self.mainloop != nil { C.pa_threaded_mainloop_lock(self.mainloop) } }