2 Copyright (C) 2002 Jeremy Hall
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 $Id: zombie.c,v 1.1 2005/08/18 11:42:08 letz Exp $
26 #include <jack/jack.h>
30 jack_port_t
* output_port
;
33 process(jack_nframes_t nframes
, void* arg
)
35 if (count
++ == 1000) {
36 printf("process block\n");
47 printf("shutdown \n");
52 main (int argc
, char *argv
[])
54 jack_client_t
* client
= NULL
;
55 /* try to become a client of the JACK server */
56 if ((client
= jack_client_open ("zombie", JackNullOption
, NULL
)) == 0) {
57 fprintf (stderr
, "JACK server not running?\n");
61 jack_set_process_callback (client
, process
, NULL
);
62 jack_on_shutdown(client
, shutdown
, NULL
);
63 output_port
= jack_port_register (client
, "port1", JACK_DEFAULT_AUDIO_TYPE
, JackPortIsOutput
, 0);
65 /* tell the JACK server that we are ready to roll */
66 if (jack_activate (client
)) {
67 fprintf (stderr
, "cannot activate client");
71 jack_connect(client
, jack_port_name(output_port
), "coreaudio:Built-in Audio:in2");
78 jack_deactivate (client
);
79 jack_client_close (client
);
84 jack_client_close (client
);