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

Class DSBufferDesc

public final class DSBufferDesc {
  public int dwSize;
  public int dwFlags;
  public int dwBufferBytes;
  public int dwReserved;
  public int lpwfxFormat;
}

Describes the necessary characteristics of a new DirectSoundBuffer object. This class is used by the CreateSoundBuffer method.

Fields

dwSize
Size of this class, in bytes.
dwFlags
One or more values of DBSCAPS_ type, identifying the capabilities to include when creating a new DirectSoundBuffer object.
dwBufferBytes
Size of the new buffer, in bytes. This value must be 0 when creating primary buffers.
dwReserved
This value is reserved. Do not use.
lpwfxFormat
Identifier representing the wave format for the sound buffer.

The DSBCAPS_LOCHARDWARE and DSBCAPS_LOCSOFTWARE flags used in the dwFlags field are optional and mutually exclusive. DSBCAPS_LOCHARDWARE forces the buffer to reside in memory located in the sound card. DSBCAPS_LOCSOFTWARE forces the buffer to reside in main system memory, if possible.

These flags are also defined for the dwFlags field of the DSBCaps class, and when used there, the specified flag indicates the actual location of the DirectSoundBuffer object.

When creating a primary buffer, applications must set the dwBufferBytes field to 0; DirectSound will determine the optimal buffer size for the particular sound device in use. To determine the size of a created primary buffer, call GetCaps.

Top© 1996 Microsoft Corporation. All rights reserved.