예제 #1
0
파일: pulsego.go 프로젝트: deadsy/xsynth
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)
}
예제 #2
0
파일: pulsego.go 프로젝트: deadsy/xsynth
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)
}
예제 #3
0
파일: pulsego.go 프로젝트: deadsy/xsynth
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)
}
예제 #4
0
// Acquire an exclusive lock on the mainloop
//
func (self *Client) Lock() {
	if self.mainloop != nil {
		C.pa_threaded_mainloop_lock(self.mainloop)
	}
}