" -t --threshold Set onset detection threshold.\n"
" -s --silence Select silence threshold.\n"
" -p --pitch Select pitch detection algorithm.\n"
+ " -B --bufsize Set buffer size.\n"
" -H --hopsize Set hopsize.\n"
" -a --averaging Use averaging.\n"
);
}
int parse_args (int argc, char **argv) {
- const char *options = "hvjo:i:O:t:s:p:H:a";
+ const char *options = "hvjo:i:O:t:s:p:B:H:a";
int next_option;
struct option long_options[] =
{
{"silence" , 1, NULL, 's'},
{"pitch" , 1, NULL, 'p'},
{"averaging", 0, NULL, 'a'},
+ {"bufsize", 1, NULL, 'B'},
{"hopsize", 1, NULL, 'H'},
{NULL , 0, NULL, 0}
};
case 'a':
averaging = 1;
break;
+ case 'B':
+ buffer_size = atoi(optarg);
+ break;
case 'H':
overlap_size = atoi(optarg);
break;
case -1: /* done with options */
break;
default: /*something else unexpected */
+ fprintf(stderr, "Error parsing option '%c'\n", next_option);
abort ();
}
}