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)) }
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() + "'") } }
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)) }