summaryrefslogtreecommitdiff
path: root/synth/cli.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-09 13:06:58 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-09 13:06:58 +0100
commit216f7933c5b4b65f7f45d3c459ead10f160d124b (patch)
tree7d7e0c6a7af1723a4d536bd4d12c50572db77896 /synth/cli.cpp
parent8320af55e716f352f2720801fcd73913f2e7d19c (diff)
envelope_update_frames can now be set via CLI and config file
Diffstat (limited to 'synth/cli.cpp')
-rw-r--r--synth/cli.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/synth/cli.cpp b/synth/cli.cpp
index 376edc3..eb52c95 100644
--- a/synth/cli.cpp
+++ b/synth/cli.cpp
@@ -44,6 +44,8 @@ void parse_args(int argc, char** argv)
{"max-portamento-time", required_argument, 0, 303},
{"filter-update-freq", required_argument, 0, 305},
{"lfo-update-freq", required_argument, 0, 306},
+ {"env-update-freq", required_argument, 0, 307},
+ {"envelope-update-freq", required_argument, 0, 307},
{"no-connect-audio-out", no_argument, 0, 'a'},
{"no-connect-audio", no_argument, 0, 'a'},
{"dont-connect-audio-out", no_argument, 0, 'a'},
@@ -164,6 +166,14 @@ void parse_args(int argc, char** argv)
else
output_warning("WARNING: not a number in --lfo-update-freq option. ignoring it...");
break;
+ case 307: if (isfloat(optarg))
+ if (atoi(optarg)<=0)
+ output_warning("WARNING: envelope-update-freq must be positive. ignoring it...");
+ else
+ envelope_update_freq_hz=atof(optarg);
+ else
+ output_warning("WARNING: not a number in --envelope-update-freq option. ignoring it...");
+ break;
default: cout << "ERROR: invalid command line options. try the --help switch" << endl;
exit(1);