jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
619B

  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <jack/jack.h>
  4. #define TRUE 1
  5. #define FALSE 0
  6. int
  7. main (int argc, char *argv[])
  8. {
  9. jack_client_t *client;
  10. if ((client = jack_client_new ("input monitoring")) == 0) {
  11. fprintf (stderr, "jack server not running?\n");
  12. return 1;
  13. }
  14. if (jack_port_request_monitor_by_name (client, argv[1], TRUE)) {
  15. fprintf (stderr, "could not enable monitoring for %s\n", argv[1]);
  16. }
  17. sleep (30);
  18. if (jack_port_request_monitor_by_name (client, argv[1], FALSE)) {
  19. fprintf (stderr, "could not disable monitoring for %s\n", argv[1]);
  20. }
  21. jack_client_close (client);
  22. exit (0);
  23. }