Package com.ms.com.directX Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class WaveFormatEx

public final class WaveFormatEx {
  public short wFormatTag;
  public short nChannels;
  public int nSamplesPerSec;
  public int nAvgBytesPerSec;
  public short nBlockAlign;
  public short wBitsPerSample;
  public short cbSize;
  public byte[] extra;
}

Specifies the format of data in a sound buffer.

Fields

wFormatTag
Waveform-audio format type. Format tags are registered with Microsoft Corporation for many compression algorithms.
nChannels
Number of channels in the waveform-audio data. Monaural data uses one channel and stereo data uses two channels.
nSamplesPerSec
Sample rate, in samples per second (hertz), that each channel should be played or recorded.
nAvgBytesPerSec
Required average data-transfer rate, in bytes per second, for the format tag.
nBlockAlign
Block alignment, in bytes. The block alignment is the minimum atomic unit of data for the wFormatTag format type. Playback and record software must process a multiple of nBlockAlign bytes of data at a time. Data written and read from a device must always start at the beginning of a block. For example, it is illegal to start playback of PCM data in the middle of a sample (that is, on a non-block-aligned boundary).
wBitsPerSample
Bits per sample for the wFormatTag format type. If a compression scheme cannot define a bits-per-sample value, this field is zero.
cbSize
Size, in bytes, of extra format information.
extra
Array variable that contains extra format information.


Top© 1996 Microsoft Corporation. All rights reserved.