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.

32 lines
639B

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