git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3022 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.90
@@ -26,6 +26,7 @@ Michael Voigt | |||||
2008-10-15 Stephane Letz <letz@grame.fr> | 2008-10-15 Stephane Letz <letz@grame.fr> | ||||
* Fix a crash in JackEngine::Close when backend cannot be loaded. | * Fix a crash in JackEngine::Close when backend cannot be loaded. | ||||
* Tim Blechmann optimization patch. | |||||
2008-10-15 Stephane Letz <letz@grame.fr> | 2008-10-15 Stephane Letz <letz@grame.fr> | ||||
@@ -126,20 +126,6 @@ bool JackConnectionManager::IsConnected(jack_port_id_t port_src, jack_port_id_t | |||||
return fConnection[port_src].CheckItem(port_dst); | return fConnection[port_src].CheckItem(port_dst); | ||||
} | } | ||||
/*! | |||||
\brief Get the connection number of a given port. | |||||
*/ | |||||
jack_int_t JackConnectionManager::Connections(jack_port_id_t port_index) const | |||||
{ | |||||
return fConnection[port_index].GetItemCount(); | |||||
} | |||||
jack_port_id_t JackConnectionManager::GetPort(jack_port_id_t port_index, int connection) const | |||||
{ | |||||
assert(connection < CONNECTION_NUM_FOR_PORT); | |||||
return (jack_port_id_t)fConnection[port_index].GetItem(connection); | |||||
} | |||||
/*! | /*! | ||||
\brief Get the connection port array. | \brief Get the connection port array. | ||||
*/ | */ | ||||
@@ -396,8 +396,20 @@ class SERVER_EXPORT JackConnectionManager | |||||
int Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst); | int Disconnect(jack_port_id_t port_src, jack_port_id_t port_dst); | ||||
bool IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst) const; | bool IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst) const; | ||||
jack_int_t Connections(jack_port_id_t port_index) const; | |||||
jack_port_id_t GetPort(jack_port_id_t port_index, int connection) const; | |||||
/*! | |||||
\brief Get the connection number of a given port. | |||||
*/ | |||||
jack_int_t Connections(jack_port_id_t port_index) const | |||||
{ | |||||
return fConnection[port_index].GetItemCount(); | |||||
} | |||||
jack_port_id_t GetPort(jack_port_id_t port_index, int connection) const | |||||
{ | |||||
assert(connection < CONNECTION_NUM_FOR_PORT); | |||||
return (jack_port_id_t)fConnection[port_index].GetItem(connection); | |||||
} | |||||
const jack_int_t* GetConnections(jack_port_id_t port_index) const; | const jack_int_t* GetConnections(jack_port_id_t port_index) const; | ||||
bool IncFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst); | bool IncFeedbackConnection(jack_port_id_t port_src, jack_port_id_t port_dst); | ||||
@@ -56,13 +56,6 @@ float* JackGraphManager::GetBuffer(jack_port_id_t port_index) | |||||
return fPortArray[port_index].GetBuffer(); | return fPortArray[port_index].GetBuffer(); | ||||
} | } | ||||
// RT, client | |||||
int JackGraphManager::GetConnectionsNum(jack_port_id_t port_index) | |||||
{ | |||||
JackConnectionManager* manager = ReadCurrentState(); | |||||
return manager->Connections(port_index); | |||||
} | |||||
// Server | // Server | ||||
void JackGraphManager::InitRefNum(int refnum) | void JackGraphManager::InitRefNum(int refnum) | ||||
{ | { | ||||
@@ -79,7 +79,13 @@ class SERVER_EXPORT JackGraphManager : public JackShmMem, public JackAtomicState | |||||
int Connect(jack_port_id_t src_index, jack_port_id_t dst_index); | int Connect(jack_port_id_t src_index, jack_port_id_t dst_index); | ||||
int Disconnect(jack_port_id_t src_index, jack_port_id_t dst_index); | int Disconnect(jack_port_id_t src_index, jack_port_id_t dst_index); | ||||
int IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst); | int IsConnected(jack_port_id_t port_src, jack_port_id_t port_dst); | ||||
int GetConnectionsNum(jack_port_id_t port_index); | |||||
// RT, client | |||||
int GetConnectionsNum(jack_port_id_t port_index) | |||||
{ | |||||
JackConnectionManager* manager = ReadCurrentState(); | |||||
return manager->Connections(port_index); | |||||
} | |||||
const char** GetConnections(jack_port_id_t port_index); | const char** GetConnections(jack_port_id_t port_index); | ||||
void GetConnections(jack_port_id_t port_index, jack_int_t* connections); // TODO | void GetConnections(jack_port_id_t port_index, jack_int_t* connections); // TODO | ||||
@@ -73,11 +73,6 @@ void JackPort::Release() | |||||
fAlias2[0] = '\0'; | fAlias2[0] = '\0'; | ||||
} | } | ||||
float* JackPort::GetBuffer() | |||||
{ | |||||
return fBuffer; | |||||
} | |||||
int JackPort::GetRefNum() const | int JackPort::GetRefNum() const | ||||
{ | { | ||||
return fRefNum; | return fRefNum; | ||||
@@ -154,11 +149,6 @@ int JackPort::EnsureMonitor(bool onoff) | |||||
return 0; | return 0; | ||||
} | } | ||||
bool JackPort::MonitoringInput() | |||||
{ | |||||
return (fMonitorRequests > 0); | |||||
} | |||||
const char* JackPort::GetName() const | const char* JackPort::GetName() const | ||||
{ | { | ||||
return fName; | return fName; | ||||
@@ -94,11 +94,17 @@ class SERVER_EXPORT JackPort | |||||
int RequestMonitor(bool onoff); | int RequestMonitor(bool onoff); | ||||
int EnsureMonitor(bool onoff); | int EnsureMonitor(bool onoff); | ||||
bool MonitoringInput(); | |||||
bool MonitoringInput() | |||||
{ | |||||
return (fMonitorRequests > 0); | |||||
} | |||||
float* GetBuffer(); | |||||
int GetRefNum() const; | |||||
float* GetBuffer() | |||||
{ | |||||
return fBuffer; | |||||
} | |||||
int GetRefNum() const; | |||||
}; | }; | ||||