WAVEFORMAT

WAVEFORMAT

Defines the format of waveform-audio data.

typedef struct waveformat_tag {
    WORD wFormatTag;
    WORD nChannels;
    DWORD nSamplesPerSec;
    DWORD nAvgBytesPerSec;
    WORD nBlockAlign;
} WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT;

Members

  • wFormatTag
    Format type of the audio data.
  • nChannels
    Number of channels in the waveform-audio data. Mono data uses one channel, and stereo data uses two channels.
  • nSamplesPerSec
    Sample rate, in samples per second.
  • nAvgBytesPerSec
    Required average data transfer rate, in bytes per second.
  • nBlockAlign
    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).

Remarks

Only format information common to all waveform-audio data formats is included in this structure.

Requirements

Header: Declared in Audiodefs.h.