We can't assume the data is stereo or at 22050 Hz. This needs to be a bit more generic.