Browse Source

use jack_client_internal_by_id() and dont use a loop.

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@4064 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.120.1
torben 15 years ago
parent
commit
c1f54ae504
1 changed files with 25 additions and 31 deletions
  1. +25
    -31
      jackd/clientengine.c

+ 25
- 31
jackd/clientengine.c View File

@@ -908,44 +908,38 @@ jack_client_activate (jack_engine_t *engine, jack_client_id_t id)

jack_lock_graph (engine);

for (node = engine->clients; node; node = jack_slist_next (node)) {

if (((jack_client_internal_t *) node->data)->control->id
== id) {
client = (jack_client_internal_t *) node->data;
client->control->active = TRUE;

jack_transport_activate(engine, client);
if (client = jack_client_internal_by_id (engine, id))
{
client->control->active = TRUE;

/* we call this to make sure the FIFO is
* built+ready by the time the client needs
* it. we don't care about the return value at
* this point.
*/
jack_transport_activate(engine, client);

jack_get_fifo_fd (engine,
++engine->external_client_cnt);
jack_sort_graph (engine);
/* we call this to make sure the FIFO is
* built+ready by the time the client needs
* it. we don't care about the return value at
* this point.
*/

// send delayed notifications for ports.
for (node2 = client->ports; node2; node2 = jack_slist_next (node2)) {
jack_port_internal_t *port = (jack_port_internal_t *) node2->data;
jack_port_registration_notify (engine, port->shared->id, TRUE);
}
jack_get_fifo_fd (engine,
++engine->external_client_cnt);
jack_sort_graph (engine);

for (i = 0; i < engine->control->n_port_types; ++i) {
event.type = AttachPortSegment;
event.y.ptid = i;
jack_deliver_event (engine, client, &event);
}
// send delayed notifications for ports.
for (node2 = client->ports; node2; node2 = jack_slist_next (node2)) {
jack_port_internal_t *port = (jack_port_internal_t *) node2->data;
jack_port_registration_notify (engine, port->shared->id, TRUE);
}

event.type = BufferSizeChange;
for (i = 0; i < engine->control->n_port_types; ++i) {
event.type = AttachPortSegment;
event.y.ptid = i;
jack_deliver_event (engine, client, &event);

ret = 0;
break;
}

event.type = BufferSizeChange;
jack_deliver_event (engine, client, &event);

ret = 0;
}




Loading…
Cancel
Save