static int checkSampleRate(int value) { if (!(16000 <= value && value <= 192000)) { throw "The sample rate must be between 16000 and 192000."; } return value; }