mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-23 04:45:40 +00:00
parent
369ea0f608
commit
0047eb2776
|
@ -13,8 +13,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
static const double microphone_latency = 0.2; // seconds
|
|
||||||
|
|
||||||
struct SoundIoRingBuffer *ring_buffer = NULL;
|
struct SoundIoRingBuffer *ring_buffer = NULL;
|
||||||
|
|
||||||
static enum SoundIoFormat prioritized_formats[] = {
|
static enum SoundIoFormat prioritized_formats[] = {
|
||||||
|
@ -182,6 +180,7 @@ static int usage(char *exe) {
|
||||||
" [--in-raw]\n"
|
" [--in-raw]\n"
|
||||||
" [--out-device id]\n"
|
" [--out-device id]\n"
|
||||||
" [--out-raw]\n"
|
" [--out-raw]\n"
|
||||||
|
" [--latency seconds]\n"
|
||||||
, exe);
|
, exe);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -193,6 +192,9 @@ int main(int argc, char **argv) {
|
||||||
char *out_device_id = NULL;
|
char *out_device_id = NULL;
|
||||||
bool in_raw = false;
|
bool in_raw = false;
|
||||||
bool out_raw = false;
|
bool out_raw = false;
|
||||||
|
|
||||||
|
double microphone_latency = 0.2; // seconds
|
||||||
|
|
||||||
for (int i = 1; i < argc; i += 1) {
|
for (int i = 1; i < argc; i += 1) {
|
||||||
char *arg = argv[i];
|
char *arg = argv[i];
|
||||||
if (arg[0] == '-' && arg[1] == '-') {
|
if (arg[0] == '-' && arg[1] == '-') {
|
||||||
|
@ -223,6 +225,8 @@ int main(int argc, char **argv) {
|
||||||
in_device_id = argv[i];
|
in_device_id = argv[i];
|
||||||
} else if (strcmp(arg, "--out-device") == 0) {
|
} else if (strcmp(arg, "--out-device") == 0) {
|
||||||
out_device_id = argv[i];
|
out_device_id = argv[i];
|
||||||
|
} else if (strcmp(arg, "--latency") == 0) {
|
||||||
|
microphone_latency = atof(argv[i]);
|
||||||
} else {
|
} else {
|
||||||
return usage(exe);
|
return usage(exe);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue