2

I have two WAV files that I'm playing via a program that I made. One plays and one doesn't. I read somewhere that WAV files are container files... What does that mean?

1 Answer 1

5

WAV files are a realisation of a Microsoft format called RIFF (Resource Interchange File Format), that is specific to audio data. The file contains two Chunks (or blocks). The first chunk a file header that contains format details for the data that is held in the second chunk. The data is "contained" in this chunk and can be encoded using a number of different codecs and this is defined in the header. The most common format for the data is the raw PCM audio samples, but different sample formats and compressions can be used.

If this is code that you have generated yourself it would seem likely that you are expecting the data to be received in a certain format, but your data in one file is in a different format. Use a RIFF file viewer to look at the offending file and check the format of the data and debug your code accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.