0
votes

I'm trying to write software that reads a WAV file and I want to validate whether the size provided in the "RIFF" header actually matches the size of the file. Currently my software will loop through each chunk and stop once it reads the "data" chunk.

In every file I have encountered, the "data" chunk is the last chunk in the file, but I haven't found any specification that explicitly states it MUST be the last chunk in the file.

Is it technically valid for a WAV file to have additional chunks after the "data" chunk? Or can I safely assume that any file that does this is not conforming to the standard format?

1

1 Answers

1
votes

RIFF files may contain several types of information. WAV format is a private case of RIFF. According to this link there may be some other chunks in a WAV file, like FACT chunk and Cue-Points chunk, altough - " must always occur before , and both of these chunks are mandatory in a WAVE file."