+ else if(!strcmp(name, "m")) {
+ mp3_bitrate = atoi(val);
+ return 0;
+ }
+ else if(!strcmp(name, "r")) {
+ samplerate = atoi(val);
+ if(samplerate >= 11000 && samplerate <= 12000)
+ samplerate = 11025;
+ else if(samplerate >= 22000 && samplerate <= 23000)
+ samplerate = 22050;
+ else if(samplerate >= 44000 && samplerate <= 45000)
+ samplerate = 44100;
+ else {
+ fprintf(stderr, "Invalid samplerate: %d\n", samplerate);
+ fprintf(stderr, "Allowed values: 11025, 22050, 44100\n", samplerate);
+ exit(1);
+ }
+ return 1;
+ }