#include #include "Arguments.h" using std::string; Arguments::Arguments(int argc, char** argv) { while(1) { switch(getopt(argc, argv, "p:b:t:")) { case 'p': { this->max_threads = atoi(optarg); continue; } case 'b': { this->gain_bass = atoi(optarg); continue; } case 't': { this->gain_treble = atoi(optarg); continue; } case -1: break; } if (optind + 2 > argc) { printf("please provide an input and output file\n"); exit(1); } this->file_input = string(argv[optind++]); this->file_output = string(argv[optind++]); break; } }