Beispiel #1
0
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)
}
Beispiel #2
0
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)
}
Beispiel #3
0
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)
}
Beispiel #4
0
// Release an exclusive lock on the mainloop
//
func (self *Client) Unlock() {
	if self.mainloop != nil {
		C.pa_threaded_mainloop_unlock(self.mainloop)
	}
}