Platform SDK: DirectX

DSBUFFERDESC

The DSBUFFERDESC type describes the necessary characteristics of a new DirectSoundBuffer object. This type is used by the DirectSound.CreateSoundBuffer method.

Type DSBUFFERDESC
    lBufferBytes As Long 
    lFlags As CONST_DSBCAPSFLAGS 
End Type

Members

lBufferBytes
Size of the buffer, in bytes. This value must be 0 when creating primary buffers. For secondary buffers, the size must be in the range from 4 to &H0FFFFFFF (268,435,455).
lFlags
Flags specifying the capabilities of the buffer. Can be zero or one or more of the constants of the CONST_DSBCAPSFLAGS enumeration.

Remarks

The DSBCAPS_LOCHARDWARE and DSBCAPS_LOCSOFTWARE flags used in the lFlags member 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.

Sound buffers created with the DSBCAPS_CTRLPOSITIONNOTIFY flag must set a notification event. If you create a sound buffer with this flag but don't set any notifications, the behavior is undefined.