examples: add --jack param

This commit is contained in:
Andrew Kelley 2015-07-29 01:13:57 -07:00
parent 97ee72ce5f
commit 31678c7777
2 changed files with 6 additions and 2 deletions

View file

@ -14,7 +14,7 @@
// list or keep a watch on audio devices // list or keep a watch on audio devices
static int usage(char *exe) { 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; return 1;
} }
@ -120,6 +120,8 @@ int main(int argc, char **argv) {
backend = SoundIoBackendAlsa; backend = SoundIoBackendAlsa;
} else if (strcmp("--pulseaudio", arg) == 0) { } else if (strcmp("--pulseaudio", arg) == 0) {
backend = SoundIoBackendPulseAudio; backend = SoundIoBackendPulseAudio;
} else if (strcmp("--jack", arg) == 0) {
backend = SoundIoBackendJack;
} else { } else {
return usage(exe); return usage(exe);
} }

View file

@ -26,7 +26,7 @@ static void panic(const char *format, ...) {
} }
static int usage(char *exe) { 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; return 1;
} }
@ -86,6 +86,8 @@ int main(int argc, char **argv) {
backend = SoundIoBackendAlsa; backend = SoundIoBackendAlsa;
} else if (strcmp("--pulseaudio", arg) == 0) { } else if (strcmp("--pulseaudio", arg) == 0) {
backend = SoundIoBackendPulseAudio; backend = SoundIoBackendPulseAudio;
} else if (strcmp("--jack", arg) == 0) {
backend = SoundIoBackendJack;
} else { } else {
return usage(exe); return usage(exe);
} }