diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-01-27 20:15:20 -0800 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-01-27 20:15:20 -0800 |
| commit | 801133a743ec05f15991d7b6f732efa7b8cda9a7 (patch) | |
| tree | 56bbcd7b858afdf9e64461c49c264517891b75b8 /src/LV2-render_console.c | |
| parent | 481fd443acc1f3bbe85679b7d7d74902fb9aa9bd (diff) | |
added some command line processing, need to fix inconsistant multichannel behavior
Diffstat (limited to 'src/LV2-render_console.c')
| -rw-r--r-- | src/LV2-render_console.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/LV2-render_console.c b/src/LV2-render_console.c index 1d421d2..def8eb4 100644 --- a/src/LV2-render_console.c +++ b/src/LV2-render_console.c @@ -19,6 +19,9 @@ print_usage(const char* name, bool error) fprintf(os, " -h Display this help and exit\n"); fprintf(os, " -p Print control output changes to stdout\n"); fprintf(os, " -c SYM=VAL Set control value (e.g. \"vol=1.4\")\n"); + fprintf(os, " -F STRING filename for wavfile output (DEFAULT=output.wav)\n"); + fprintf(os, " -C NUM Integer number of channels for output, e.g. 2 (DEFAULT=2)\n"); + fprintf(os, " -S NUM Integer sample rate of output, e.g. 44100 (DEFAULT=48000)\n"); fprintf(os, " -l DIR Load state from save directory\n"); fprintf(os, " -d DIR Dump plugin <=> UI communication\n"); fprintf(os, " -b SIZE Buffer size for plugin <=> UI communication\n"); @@ -61,6 +64,24 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts) (++n_controls + 1) * sizeof(char*)); opts->controls[n_controls - 1] = (*argv)[a]; opts->controls[n_controls] = NULL; + } else if ((*argv)[a][1] == 'C') { + if (++a == *argc) { + fprintf(stderr, "Missing argument for -C\n"); + return 1; + } + opts->nchannels = atoi((*argv)[a]); + } else if ((*argv)[a][1] == 'S') { + if (++a == *argc) { + fprintf(stderr, "Missing argument for -S\n"); + return 1; + } + opts->sample_rate = atoi((*argv)[a]); + } else if ((*argv)[a][1] == 'F') { + if (++a == *argc) { + fprintf(stderr, "Missing argument for -F\n"); + return 1; + } + opts->outfile = (*argv)[a]; } else if ((*argv)[a][1] == 'd') { opts->dump = true; } else { |
