Fix WAV file reader and conversions