From 31678c7777e766520941858b3f655b11a525551a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 29 Jul 2015 01:13:57 -0700 Subject: [PATCH] examples: add --jack param --- example/list_devices.c | 4 +++- example/sine.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/example/list_devices.c b/example/list_devices.c index b189176..0a1f503 100644 --- a/example/list_devices.c +++ b/example/list_devices.c @@ -14,7 +14,7 @@ // list or keep a watch on audio devices static int usage(char *exe) { - fprintf(stderr, "Usage: %s [--watch] [--dummy] [--alsa] [--pulseaudio]\n", exe); + fprintf(stderr, "Usage: %s [--watch] [--dummy] [--alsa] [--pulseaudio] [--jack]\n", exe); return 1; } @@ -120,6 +120,8 @@ int main(int argc, char **argv) { backend = SoundIoBackendAlsa; } else if (strcmp("--pulseaudio", arg) == 0) { backend = SoundIoBackendPulseAudio; + } else if (strcmp("--jack", arg) == 0) { + backend = SoundIoBackendJack; } else { return usage(exe); } diff --git a/example/sine.c b/example/sine.c index 83530cb..a4bc2db 100644 --- a/example/sine.c +++ b/example/sine.c @@ -26,7 +26,7 @@ static void panic(const char *format, ...) { } static int usage(char *exe) { - fprintf(stderr, "Usage: %s [--dummy] [--alsa] [--pulseaudio]\n", exe); + fprintf(stderr, "Usage: %s [--dummy] [--alsa] [--pulseaudio] [--jack]\n", exe); return 1; } @@ -86,6 +86,8 @@ int main(int argc, char **argv) { backend = SoundIoBackendAlsa; } else if (strcmp("--pulseaudio", arg) == 0) { backend = SoundIoBackendPulseAudio; + } else if (strcmp("--jack", arg) == 0) { + backend = SoundIoBackendJack; } else { return usage(exe); }