Difference in WAV files?


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?


Posted 2013-12-16T12:40:46.660

Reputation: 121



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.

Bit Depth

Posted 2013-12-16T12:40:46.660

Reputation: 1 470