Platform SDK: DirectX

DirectSoundBuffer.GetCaps

The DirectSoundBuffer.GetCaps method retrieves the capabilities of the buffer.

object.GetCaps(caps As DSBCAPS)

Parameters

object
Object expression that resolves to a DirectSoundBuffer object.
caps
DSBCAPS type to contain the capabilities of this sound buffer.

Error Codes

If the method fails, an error is raised and Err.Number may be set to DSERR_INVALIDPARAM.

Remarks

The DSBCAPS type contains similar information to the DSBUFFERDESC type passed to the DirectSound.CreateSoundBuffer method, with some additional information. This information can include the buffer's location, either in hardware or software, and some cost measures. Examples of cost measures include the time it takes to download to a hardware buffer and the processing overhead required to mix and play the buffer when it is in software.

The flags in the lFlags member of the DSBCAPS type are the same flags used by the DSBUFFERDESC type. The only difference is that in the DSBCAPS type, either DSBCAPS_LOCHARDWARE or DSBCAPS_LOCSOFTWARE is specified according to the location of the buffer memory. In the DSBUFFERDESC type, these flags are optional and, depending on which flag is specified, force the buffer to be located in either hardware or software.