Logo Search packages:      
Sourcecode: patchage version File versions  Download package

bool JackDriver::disconnect ( const string &  src_module_name,
const string &  src_port_name,
const string &  dst_module_name,
const string &  dst_port_name 
)

Disconnects two Jack audio ports.

Returns:
Whether disconnection succeeded.

Definition at line 190 of file JackDriver.cpp.

{
      pthread_mutex_lock(m_refresh_mutex);

      string src_port_jack_name = src_module_name + ":" + src_port_name;
      string dst_port_jack_name = dst_module_name + ":" + dst_port_name;

      int result = jack_disconnect(m_client, src_port_jack_name.c_str(), dst_port_jack_name.c_str());
      
      string msg;
      
      if (result == 0) {
            msg = "Sucessfully disconnected jack ports";
      } else {
            msg = "Unable to disconnect ";
            msg += src_port_jack_name;
            msg += " -> ";
            msg += dst_port_jack_name;
      }
      m_app->status_message(msg);
      
      pthread_mutex_unlock(m_refresh_mutex);
      return (!result);
}


Generated by  Doxygen 1.6.0   Back to index