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

void AlsaDriver::add_connections ( PatchagePort port  )  [private]

Add all connections for the given port.

Definition at line 253 of file AlsaDriver.cpp.

References PatchagePort::alsa_addr(), and PatchBay::Port::is_input().

Referenced by refresh_connections().

      const snd_seq_addr_t* addr           = port->alsa_addr();
      PatchagePort*         connected_port = NULL;
      // Fix a problem with duplex->duplex connections (would show up twice)
      // No sense doing them all twice anyway..
      if (port->is_input())
      snd_seq_query_subscribe_t* subsinfo;
      snd_seq_query_subscribe_set_root(subsinfo, addr);
      snd_seq_query_subscribe_set_index(subsinfo, 0);
      while(!snd_seq_query_port_subscribers(m_seq, subsinfo)) {
            const snd_seq_addr_t* connected_addr = snd_seq_query_subscribe_get_addr(subsinfo);
            connected_port = m_patch_bay->find_port(connected_addr, !port->is_input());

            if (connected_port != NULL) {
                  m_patch_bay->add_connection(port, connected_port);

            snd_seq_query_subscribe_set_index(subsinfo, snd_seq_query_subscribe_get_index(subsinfo) + 1);


Generated by  Doxygen 1.6.0   Back to index