Beispiel #1
0
func (client *Client) Disconnect(srcPort, dstPort string) int {
	csrc := C.CString(srcPort)
	defer C.free(unsafe.Pointer(csrc))
	cdst := C.CString(dstPort)
	defer C.free(unsafe.Pointer(cdst))

	return int(C.jack_disconnect(client.handler, csrc, cdst))
}
Beispiel #2
0
func (this *Port) Disconnect(otherPortName string) error {
	nameCStr := C.CString(this.GetName())
	otherPortNameCStr := C.CString(otherPortName)
	defer C.free(unsafe.Pointer(nameCStr))
	defer C.free(unsafe.Pointer(otherPortNameCStr))

	if C.jack_disconnect(this.client.jackClient, nameCStr, otherPortNameCStr) == 0 {
		return nil
	} else {
		return errors.New("jack_disconnect failed for port '" + this.GetName() + "'")
	}
}
Beispiel #3
0
func (client *Client) DisconnectPorts(srcPort, dstPort *Port) int {
	csrc := C.jack_port_name(srcPort.handler)
	cdst := C.jack_port_name(dstPort.handler)

	return int(C.jack_disconnect(client.handler, csrc, cdst))
}