Browse Source

Show use of jack_cycle_signal/jack_cycle_wait

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1876 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.71
sletz 17 years ago
parent
commit
89be79e09c
1 changed files with 20 additions and 1 deletions
  1. +20
    -1
      example-clients/tw.c

+ 20
- 1
example-clients/tw.c View File

@@ -48,13 +48,16 @@ _process (jack_nframes_t nframes)
} else if (ts == JackTransportStopped) {
if (client_state == Run)
if (client_state == Run) {
client_state = Exit;
return -1; // to stop the thread
}
}

return 0;
}

/*
int
process (jack_nframes_t nframes, void* arg)
{
@@ -64,6 +67,22 @@ process (jack_nframes_t nframes, void* arg)

return 0;
}
*/

int
process (jack_nframes_t nframes, void* arg)
{
jack_client_t* client = (jack_client_t*) arg;
do {
int status = _process(nframes);
jack_cycle_signal (client, status);
// possibly do something else after signaling next clients in the graph
nframes = jack_cycle_wait (client);
} while (nframes != 0);
return 0;
}

/**
* JACK calls this shutdown_callback if the server ever shuts down or


Loading…
Cancel
Save