Package com.ms.com.directX |
![]() Previous |
![]() Microsoft Packages |
![]() Index |
![]() Next |
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
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.