Article View: comp.windows.ms.programmer
Article #232MS WAVE file format
From: Sue Raisty
Date: Wed, 08 Apr 1992 18:56
Date: Wed, 08 Apr 1992 18:56
69 lines
3004 bytes
3004 bytes
Hello. I don't usually read netnews, but I need your help.
I have a few questions about WAVE file format. I have been referencing
the _Microsoft Windows Multimedia Programmer's Reference_ for information on
the format. To my untrained eye it does not seem like the format described in
the book matches the format of the WAVE files that came with the Windows 3.1
beta release that I have. I looked at ding.wav, chord.wav, chime.wav, and
tada.wav.
The book says (on Pg. 8-40)
<WAVE-form> -> RIFF( 'WAVE' //Form type
<fmt-ck> // Waveform format
<data-ck> ) // Waveform data
<fmt-ck> -> fmt( <wave-format> // WaveFormat Structure
<format-specific> // Dependent on format category
<wave-format> -> struct {WORD formatTag; // Format Category
WORD nChannels; // No. channels
DWORD nSamplesPerSec; // Sampling Rate
DWORD nAvgBytesPerSec; // For buffering
WORD nBlockAlign;} // Block alignments
<PCM-format-specific> -> struct {WORD nBitsPerSample;} //Sample Size
<data-ck> -> data( <wave-data> )
----------------
Below I have the translations of the binary wave files into ascii.
ding
52 49 46 46 RIFF
46 2D 0 0
57 41 56 45 WAVE
66 6D 74 fmt
20 10 0 0 0 1 0 1 0 22 56 0
0 22 56 0 0 1 0 8 0
64 61 74 61 data
22 2D 0 0
80 80 80 80 80 80 80 80 80....
chimes
52 49 46 46 RIFF
28 3E 0 0
57 41 56 45 WAVE
66 6D 74 fmt
20 10 0 0 0 1 0 1 0 22 56 0 0 22 56 0 0 1 0 8 0
64 61 74 61 data
4 3E 0 0
80 80 80 80 80 80 80 80 80 80........
----
As you can see, I found where the text is that says RIFF, WAVE, fmt, etc...
But I am a bit confused because I can't find the parantheses, etc...
Also, what is the Word that is in-between the RIFF and WAVE text? It is
not specified in the book... It was different in all the files I checked.
There also seem to be more bytes in the fmt-ck than I think there should
be. By my count, there should be 16 bytes (7 words in the wave-fromat and
1 word in the format-specific), but you can see that there are 21. I guess
that some of the extra bytes must be leading and trailing characters, but
I can't guess where. I am also a bit confused about the bytes right after
the text "data". What are they, what do they do, how long are they, etc...
I would really appreciate it if anyone could explain this differences to me
or send me any current and more detailed information on the WAVE file format.
Since I rarely, if ever, read news, please send email to me personally...
Thanks muchly,
Sue Raisty
raisty@berlioz.nsc.com
Technical Details
Message-ID:
<1992Apr8.185658.12584@berlioz.nsc.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!nsc!voder!berlioz.nsc.com!raistyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!nsc!voder!berlioz.nsc.com!raisty From: raisty@berlioz.nsc.com (Sue Raisty) Newsgroups: comp.windows.ms.programmer Subject: MS WAVE file format Keywords: multimedia, WAVE, MS Windows Message-ID: <1992Apr8.185658.12584@berlioz.nsc.com> Date: 8 Apr 92 18:56:58 GMT Sender: Susan Raisty Organization: National Semiconductor Corporation Lines: 69