示例#1
0
// Close destroys a Client.
//
// All resources used by the client are cleaned up; after this function is
// called, the Client is no longer valid and should not be used.
func (this *Client) Close() error {
	this.Deactivate()
	this.stopGenericCallbackSync()
	this.stopProcessCallbackSync()
	result := C.jack_client_close(this.jackClient)
	if result != 0 {
		return errors.New("jack_client_close returned " + strconv.Itoa(int(result)) + " for client '" + this.GetName() + "'")
	}
	return nil
}
示例#2
0
文件: jack.go 项目: padster/go-jack
func (client *Client) Close() int {
	if client == nil {
		return 0
	}
	return int(C.jack_client_close(client.handler))
}