From: Mike M. <mel...@pc...> - 2003-09-18 00:30:17
|
On Thu, 18 Sep 2003, James Courtier-Dutton wrote: > It was to get .wav files with AC3 in them to work. > These are basically .wav files with stereo 16 bits audio, but instead of > PCM samples, they are AC3 frames. They are used when people want to > write AC3 tracks onto audio CDs. > > I added the else in there to hopefully catch corrupted .wav files, but > it seems to falsely think MS/IMA ADPCM files are corrupted .wav files. > > Maybe we should have the "else" statement only work if the stream is not > compressed. Is there a way to test for compressed or not? The best way to do this is by testing the first 16-bit LE field of the WAV format header, biCompression, which occurs at offset 0x14-0x15 in WAV files. Raw PCM is format 0x0001. MS ADPCM = 0x0002. MS IMA = 0x0011. MP3 = 0x0055. Just to name the common ones. What does that field contain for AC3 audio? Thanks... -- -Mike Melanson |