~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
JACK/example-clients/monitor_client.c


** Warning: Cannot open xref database.

1 #include <stdio.h> 2 #include <unistd.h> 3 #include <stdlib.h> 4 #include <string.h> 5 6 #include <jack/jack.h> 7 8 #define TRUE 1 9 #define FALSE 0 10 11 int 12 main (int argc, char *argv[]) 13 14 { 15 jack_client_t *client; 16 char *my_name = strrchr(argv[0], '/'); 17 18 if (my_name == 0) { 19 my_name = argv[0]; 20 } else { 21 my_name ++; 22 } 23 24 if (argc != 2) { 25 fprintf (stderr, "Usage: %s client\n", my_name); 26 return 1; 27 } 28 29 if ((client = jack_client_new ("input monitoring")) == 0) { 30 fprintf (stderr, "jack server not running?\n"); 31 return 1; 32 } 33 34 if (jack_port_request_monitor_by_name (client, argv[1], TRUE)) { 35 fprintf (stderr, "could not enable monitoring for %s\n", argv[1]); 36 jack_client_close (client); 37 return 1; 38 } 39 sleep (30); 40 if (jack_port_request_monitor_by_name (client, argv[1], FALSE)) { 41 fprintf (stderr, "could not disable monitoring for %s\n", argv[1]); 42 } 43 jack_client_close (client); 44 exit (0); 45 } 46 47

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.