Commit b50078f9 authored by sletz's avatar sletz
Browse files

Tim Blechmann optimization patch.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3022 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 86d4357b
......@@ -26,6 +26,7 @@ Michael Voigt
2008-10-15 Stephane Letz <letz@grame.fr>
* Fix a crash in JackEngine::Close when backend cannot be loaded.
* Tim Blechmann optimization patch.
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);
}
/*!
\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.
*/
......
......@@ -396,8 +396,20 @@ class SERVER_EXPORT JackConnectionManager
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;
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;
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();
}
// RT, client
int JackGraphManager::GetConnectionsNum(jack_port_id_t port_index)
{
JackConnectionManager* manager = ReadCurrentState();
return manager->Connections(port_index);
}
// Server
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 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 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);
void GetConnections(jack_port_id_t port_index, jack_int_t* connections); // TODO
......
......@@ -73,11 +73,6 @@ void JackPort::Release()
fAlias2[0] = '\0';
}
float* JackPort::GetBuffer()
{
return fBuffer;
}
int JackPort::GetRefNum() const
{
return fRefNum;
......@@ -154,11 +149,6 @@ int JackPort::EnsureMonitor(bool onoff)
return 0;
}
bool JackPort::MonitoringInput()
{
return (fMonitorRequests > 0);
}
const char* JackPort::GetName() const
{
return fName;
......
......@@ -94,11 +94,17 @@ class SERVER_EXPORT JackPort
int RequestMonitor(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;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment