git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1809 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.70
@@ -713,7 +713,7 @@ int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst) | |||||
int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst) | int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst) | ||||
{ | { | ||||
JackLog("JackEngine::PortDisconnect src = %d dst = %d\n", src, dst); | JackLog("JackEngine::PortDisconnect src = %d dst = %d\n", src, dst); | ||||
if (dst == ALL_PORTS) { | if (dst == ALL_PORTS) { | ||||
jack_int_t connections[CONNECTION_NUM]; | jack_int_t connections[CONNECTION_NUM]; | ||||
@@ -723,12 +723,12 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds | |||||
JackPort* port = fGraphManager->GetPort(src); | JackPort* port = fGraphManager->GetPort(src); | ||||
if (port->GetFlags() & JackPortIsOutput) { | if (port->GetFlags() & JackPortIsOutput) { | ||||
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | ||||
JackLog("NotifyPortConnect src = %ld dst = %ld\n false", src, connections[i]); | |||||
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", src, connections[i]); | |||||
NotifyPortConnect(src, connections[i], false); | NotifyPortConnect(src, connections[i], false); | ||||
} | } | ||||
} else { | } else { | ||||
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) { | ||||
JackLog("NotifyPortConnect src = %ld dst = %ld\n false", connections[i], src); | |||||
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", connections[i], src); | |||||
NotifyPortConnect(connections[i], src, false); | NotifyPortConnect(connections[i], src, false); | ||||
} | } | ||||
} | } | ||||
@@ -441,8 +441,10 @@ int JackGraphManager::DisconnectAll(jack_port_id_t port_index) | |||||
// Server | // Server | ||||
void JackGraphManager::GetConnections(jack_port_id_t port_index, jack_int_t* res) | void JackGraphManager::GetConnections(jack_port_id_t port_index, jack_int_t* res) | ||||
{ | { | ||||
const jack_int_t* connections = ReadCurrentState()->GetConnections(port_index); | |||||
JackConnectionManager* manager = WriteNextStateStart(); | |||||
const jack_int_t* connections = manager->GetConnections(port_index); | |||||
memcpy(res, connections, sizeof(jack_int_t) * CONNECTION_NUM); | memcpy(res, connections, sizeof(jack_int_t) * CONNECTION_NUM); | ||||
WriteNextStateStop(); | |||||
} | } | ||||
// Server | // Server | ||||
@@ -1571,9 +1571,17 @@ int main (int argc, char *argv[]) | |||||
} | } | ||||
jack_port_disconnect(client1, output_port1); | jack_port_disconnect(client1, output_port1); | ||||
//jack_sleep(1000); | |||||
//printf("Wait\n"); | |||||
jack_port_disconnect(client1, output_port2); | jack_port_disconnect(client1, output_port2); | ||||
//jack_sleep(1000); | |||||
//printf("Wait\n"); | |||||
jack_port_disconnect(client1, input_port1); | jack_port_disconnect(client1, input_port1); | ||||
//jack_sleep(1000); | |||||
//printf("Wait\n"); | |||||
jack_port_disconnect(client1, input_port2); | jack_port_disconnect(client1, input_port2); | ||||
//jack_sleep(1000); | |||||
//printf("Wait\n"); | |||||
Log("Checking a parallel model with 2 clients...\n"); | Log("Checking a parallel model with 2 clients...\n"); | ||||
jack_connect(client2, outports[0], jack_port_name(input_port1)); | jack_connect(client2, outports[0], jack_port_name(input_port1)); | ||||
jack_connect(client2, outports[0], jack_port_name(input_port2)); | jack_connect(client2, outports[0], jack_port_name(input_port2)); | ||||