summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
authordeva <deva>2009-09-10 09:34:52 +0000
committerdeva <deva>2009-09-10 09:34:52 +0000
commit28630efa5e905f501f267e5e105d184ec5dd379a (patch)
tree0e832d4ec5d3dd15a8c5107d116f742e43ed85a3 /src/drumgizmo.cc
parent2b9c45b9bb1c70908c3e753425247d8eeb38afdf (diff)
Some changes regharding minimizing the memory usage when loading audio files.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index cfc8ad5..a4d863f 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -29,6 +29,7 @@
#include "jackclient.h"
#include "drumkitparser.h"
#include "midiplayer.h"
+#include <string.h>
static const char version_str[] =
"DrumGizmo v" VERSION "\n"
@@ -59,7 +60,7 @@ int main(int argc, char *argv[])
char *midifile = NULL;
bool preload = true;
- int min_velocity = 18;
+ int min_velocity = 0;//18;
int option_index = 0;
while(1) {
@@ -107,19 +108,24 @@ int main(int argc, char *argv[])
}
}
- if(argc < option_index + 2) {
+ std::string kitfile;
+
+ if(option_index < argc) {
+ printf("non-option ARGV-elements: ");
+ while (optind < argc) {
+ if(kitfile != "") {
+ fprintf(stderr, "Can only handle a single kitfile.\n");
+ printf(usage_str, argv[0]);
+ return 1;
+ }
+ kitfile = argv[optind++];
+ }
+ printf("\n");
+ } else {
fprintf(stderr, "Missing kitfile.\n");
printf(usage_str, argv[0]);
return 1;
}
-
- if(argc > option_index + 2) {
- fprintf(stderr, "Can only handle a single kitfile.\n");
- printf(usage_str, argv[0]);
- return 1;
- }
-
- std::string kitfile = argv[option_index + 1];
printf("Using kitfile: %s\n", kitfile.c_str());