Example #1
0
// Start the mainloop
//
func (self *Client) Start() error {
	if self.mainloop != nil {
		if status := C.pa_threaded_mainloop_start(self.mainloop); status < 0 {
			return fmt.Errorf("PulseAudio mainloop start failed with code %d", status)
		}
	} else {
		return fmt.Errorf("Cannot operate on undefined PulseAudio mainloop")
	}

	return nil
}
Example #2
0
func (self *PulseMainLoop) Start() int {
	return int(C.pa_threaded_mainloop_start(self.pa))
}