diff options
Diffstat (limited to 'example-clients/zombie.c')
-rw-r--r-- | example-clients/zombie.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/example-clients/zombie.c b/example-clients/zombie.c index a3a2dadd..fb3cd24e 100644 --- a/example-clients/zombie.c +++ b/example-clients/zombie.c @@ -1,6 +1,6 @@ /* Copyright (C) 2002 Jeremy Hall - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -30,18 +30,18 @@ int count = 0; jack_port_t* output_port; static int -process(jack_nframes_t nframes, void* arg) +process(jack_nframes_t nframes, void* arg) { if (count++ == 1000) { printf("process block\n"); //while (1) {} sleep(1); } - + return 0; } -static void +static void shutdown (void *arg) { printf("shutdown \n"); @@ -57,7 +57,7 @@ main (int argc, char *argv[]) fprintf (stderr, "jack server not running?\n"); goto error; } - + jack_set_process_callback (client, process, NULL); jack_on_shutdown(client, shutdown, NULL); output_port = jack_port_register (client, "port1", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); @@ -67,9 +67,9 @@ main (int argc, char *argv[]) fprintf (stderr, "cannot activate client"); goto error; } - + jack_connect(client, jack_port_name(output_port), "coreaudio:Built-in Audio:in2"); - + while (running) { sleep(1); printf ("run\n"); @@ -78,9 +78,9 @@ main (int argc, char *argv[]) jack_deactivate (client); jack_client_close (client); return 0; - + error: - if (client) + if (client) jack_client_close (client); return 1; } |