Skip to content

Commit 3080fe3

Browse files
committed
portaudio: add examples
1 parent e2d98a2 commit 3080fe3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/audio/portaudio_common.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <string.h> // for strncpy, strstr
4444

4545
#include "debug.h"
46+
#include "host.h" // for uv_argv
4647
#include "portaudio_common.h"
4748
#include "types.h"
4849
#include "utils/color_out.h"
@@ -175,6 +176,17 @@ portaudio_print_help(enum portaudio_device_direction kind, bool full)
175176
}
176177
}
177178

179+
printf("\nExamples:\n");
180+
color_printf("\t" TBOLD("%s -%c portaudio:d=\"%s\"\n"), uv_argv[0],
181+
kind == PORTAUDIO_IN ? 's' : 'r',
182+
#ifdef _WIN32
183+
"Microsoft Sound Mapper"
184+
#elif defined __APPLE__
185+
"MacBook Pro"
186+
#else
187+
"HDA Intel PCH"
188+
#endif
189+
);
178190
error:
179191
Pa_Terminate();
180192
}

0 commit comments

Comments
 (0)