diff --git a/ChangeLog b/ChangeLog index 22496d13..2356fe07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Nedko Arnaudov 2008-03-10 Stephane Letz * Nedko Arnaudov log patch. + * Remove uneeded jack_port_connect API. 2008-03-07 Stephane Letz diff --git a/common/JackAPI.cpp b/common/JackAPI.cpp index 312b580a..3a1cead4 100644 --- a/common/JackAPI.cpp +++ b/common/JackAPI.cpp @@ -1059,29 +1059,6 @@ EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const cha } } -EXPORT int jack_port_connect(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst) -{ -#ifdef __CLIENTDEBUG__ - JackLibGlobals::CheckContext(); -#endif - JackClient* client = (JackClient*)ext_client; - if (client == NULL) { - jack_error("jack_port_connect called with a NULL client"); - return -1; - } - jack_port_id_t mysrc = (jack_port_id_t)src; - if (!CheckPort(mysrc)) { - jack_error("jack_port_connect called with a NULL src port"); - return -1; - } - jack_port_id_t mydst = (jack_port_id_t)dst; - if (!CheckPort(mydst)) { - jack_error("jack_port_connect called with a NULL dst port"); - return -1; - } - return client->PortConnect(mysrc, mydst); -} - EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src) { #ifdef __CLIENTDEBUG__ diff --git a/common/JackAPIWrapper.cpp b/common/JackAPIWrapper.cpp index 3c227d38..815d8964 100644 --- a/common/JackAPIWrapper.cpp +++ b/common/JackAPIWrapper.cpp @@ -527,13 +527,6 @@ EXPORT int jack_disconnect(jack_client_t* ext_client, const char* src, const cha return (*jack_disconnect_fun)(ext_client, src, dst); } -typedef int (*jack_port_connect_fun_def)(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst); -static jack_port_connect_fun_def jack_port_connect_fun = 0; -EXPORT int jack_port_connect(jack_client_t* ext_client, jack_port_t* src, jack_port_t* dst) -{ - return (*jack_port_connect_fun)(ext_client, src, dst); -} - typedef int (*jack_port_disconnect_fun_def)(jack_client_t* ext_client, jack_port_t* src); static jack_port_disconnect_fun_def jack_port_disconnect_fun = 0; EXPORT int jack_port_disconnect(jack_client_t* ext_client, jack_port_t* src) @@ -1080,8 +1073,7 @@ static bool init_library() jack_port_monitoring_input_fun = (jack_port_monitoring_input_fun_def)dlsym(gLibrary, "jack_port_monitoring_input"); jack_connect_fun = (jack_connect_fun_def)dlsym(gLibrary, "jack_connect"); jack_disconnect_fun = (jack_disconnect_fun_def)dlsym(gLibrary, "jack_disconnect"); - jack_port_connect_fun = (jack_port_connect_fun_def)dlsym(gLibrary, "jack_port_connect"); - jack_port_disconnect_fun = (jack_port_disconnect_fun_def)dlsym(gLibrary, "jack_port_disconnect"); + jack_port_disconnect_fun = (jack_port_disconnect_fun_def)dlsym(gLibrary, "jack_port_disconnect"); jack_port_name_size_fun = (jack_port_name_size_fun_def)dlsym(gLibrary, "jack_port_name_size"); jack_port_type_size_fun = (jack_port_type_size_fun_def)dlsym(gLibrary, "jack_port_type_size"); jack_get_sample_rate_fun = (jack_get_sample_rate_fun_def)dlsym(gLibrary, "jack_get_sample_rate"); diff --git a/common/JackClient.cpp b/common/JackClient.cpp index 92ecad91..9c61f418 100644 --- a/common/JackClient.cpp +++ b/common/JackClient.cpp @@ -552,14 +552,6 @@ int JackClient::PortDisconnect(const char* src, const char* dst) return result; } -int JackClient::PortConnect(jack_port_id_t src, jack_port_id_t dst) -{ - JackLog("JackClient::PortConnect src = %ld dst = %ld\n", src, dst); - int result = -1; - fChannel->PortConnect(GetClientControl()->fRefNum, src, dst, &result); - return result; -} - int JackClient::PortDisconnect(jack_port_id_t src) { JackLog("JackClient::PortDisconnect src = %ld\n", src); diff --git a/common/JackClient.h b/common/JackClient.h index 0f8aea89..3e3c1037 100644 --- a/common/JackClient.h +++ b/common/JackClient.h @@ -138,7 +138,6 @@ class JackClient : public JackClientInterface, public JackRunnableInterface virtual int PortConnect(const char* src, const char* dst); virtual int PortDisconnect(const char* src, const char* dst); - virtual int PortConnect(jack_port_id_t src, jack_port_id_t dst); virtual int PortDisconnect(jack_port_id_t src); virtual int PortIsMine(jack_port_id_t port_index); diff --git a/common/JackDebugClient.cpp b/common/JackDebugClient.cpp index a89af014..97a549ab 100644 --- a/common/JackDebugClient.cpp +++ b/common/JackDebugClient.cpp @@ -278,36 +278,6 @@ int JackDebugClient::PortDisconnect(const char* src, const char* dst) return res; } -int JackDebugClient::PortConnect(jack_port_id_t src, jack_port_id_t dst) -{ - CheckClient(); - if (!fIsActivated) - *fStream << "!!! ERROR !!! : Trying to connect port " << src << " to " << dst << " while the client has not been activated !" << endl; - int res = fClient->PortConnect(src, dst); - int i; - for (i = (fTotalPortNumber - 1); i >= 0; i--) { // We search the record into the history - if (fPortList[i].idport == src) { // We found the record in sources - if (fPortList[i].IsUnregistrated != 0) - *fStream << "!!! ERROR !!! : Connecting port " << src << " previoulsy unregistered !" << endl; - fPortList[i].IsConnected++; - *fStream << "Connecting port " << src << ". "; - break; - } else if (fPortList[i].idport == dst) { // We found the record in dest - if (fPortList[i].IsUnregistrated != 0) - *fStream << "!!! ERROR !!! : Connecting port " << dst << " previoulsy unregistered !" << endl; - fPortList[i].IsConnected++; - *fStream << "Connecting port " << dst << ". "; - break; - } - } - if (i == 0) // Port is not found - *fStream << "JackClientDebug : PortConnect : port was not found in debug database !" << endl; - if (res == -1) - *fStream << "Client '" << fClientName << "' try to do Portconnect but server return " << res << " ." << endl; - //*fStream << "Client Port Connect with ID done." << endl; - return res; -} - int JackDebugClient::PortDisconnect(jack_port_id_t src) { CheckClient(); diff --git a/common/JackDebugClient.h b/common/JackDebugClient.h index 3b80ab5e..72d2499e 100644 --- a/common/JackDebugClient.h +++ b/common/JackDebugClient.h @@ -91,8 +91,7 @@ class JackDebugClient : public JackClient int PortConnect(const char* src, const char* dst); int PortDisconnect(const char* src, const char* dst); - int PortConnect(jack_port_id_t src, jack_port_id_t dst); - int PortDisconnect(jack_port_id_t src); + int PortDisconnect(jack_port_id_t src); int PortIsMine(jack_port_id_t port_index);