Break-up WaveReader.read into smaller functions.