Windows Multimedia DDK (mddkqh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WAVEFORMAT
                                                 Contents Index Back
────────────────────────────────────────────────────────────────────────────
WAVEFORMAT
 
        The WAVEFORMAT structure describes the format of waveform data.
        Only format information common to all waveform data formats is
        included in this structure. For formats that require additional
        information, this structure is included as a field in another
        data structure along with the additional information.
 
        typedef struct waveformat_tag {
            WORD wFormatTag;
            WORD nChannels;
            DWORD nSamplesPerSec;
            DWORD nAvgBytesPerSec;
            WORD nBlockAlign;
        } WAVEFORMAT;
 
Fields
        WORD wFormatTag
            Specifies the format type. Currently defined format types
            are as follows:
 
            WAVE_FORMAT_PCM
                Waveform data is PCM.
 
        WORD nChannels
            Specifies the number of channels in the waveform data. Mono
            data uses 1 channel and stereo data uses 2 channels.
 
        DWORD nSamplesPerSec
            Specifies the sample rate in samples per second.
 
        DWORD nAvgBytesPerSec
            Specifies the required average data transfer rate in bytes
            per second.
 
        WORD nBlockAlign
            Specifies the block alignment in bytes. The block alignment
            is the minimum atomic unit of data. For PCM data, the block
            alignment is the number of bytes used by a single sample,
            including data for both channels if the data is stereo.
            For example, the block alignment for 16-bit stereo PCM is
            4 bytes (2 channels, 2 bytes per sample).
 
Comments
        For PCM data, the block alignment is the number of bytes used by
        a single sample, including data for both channels if the data is
        stereo. For example, the block alignment for 16-bit stereo PCM
        is 4 bytes (2 channels, 2 bytes per sample).
 
See also
        PCMWAVEFORMAT
 
                                       -♦-