At least one problem seems to be that the WAV parser expects wav files without any chunks other than fmt and data (and I'm not even sure it correctly skips the data tag?) so it just starts reading the rest of the chunks as audio data. In any case, using a proper library for parsing WAV might make sense instead of reinventing the wheel here :).
At least one problem seems to be that the WAV parser expects wav files without any chunks other than
fmt
anddata
(and I'm not even sure it correctly skips thedata
tag?) so it just starts reading the rest of the chunks as audio data. In any case, using a proper library for parsing WAV might make sense instead of reinventing the wheel here :).