Microsoft DirectX 9.0

IDirectSound8 Interface

The IDirectSound8 interface is used to create buffer objects, manage devices, and set up the environment. This interface supersedes IDirectSound and adds new methods.

Obtain this interface by using the DirectSoundCreate8 or DirectSoundFullDuplexCreate8 function, or by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSound8.

In addition to the methods inherited from IUnknown, the IDirectSound8 interface exposes the following methods.

Method Description
Compact Moves the unused portions of on-board sound memory, if any, to a contiguous block so that the largest portion of free memory will be available.
CreateSoundBuffer Creates a sound buffer object to manage audio samples.
DuplicateSoundBuffer Creates a new secondary buffer that shares the original buffer's memory.
GetCaps Retrieves the capabilities of the hardware device.
GetSpeakerConfig Retrieves the speaker configuration.
Initialize Initializes a device object that was created by using the CoCreateInstance function.
SetCooperativeLevel Sets the cooperative level of the application for this sound device.
SetSpeakerConfig Specifies the speaker configuration of the device.
VerifyCertification Ascertains whether the device driver is certified for DirectX.

The LPDIRECTSOUND8 type is defined as a pointer to the IDirectSound8 interface:

typedef struct IDirectSound8  *LPDIRECTSOUND8;

Remarks

Only objects of class CLSID_DirectSound8 support this interface. All device objects created by DirectSoundCreate8 and DirectSoundFullDuplexCreate8 fall into this category. Objects of class CLSID_DirectSound, which include all those created by using the earlier DirectSoundCreate function, support only the earlier IDirectSound interface.

The behavior of CLSID_DirectSound8 objects is somewhat different from that of CLSID_DirectSound objects. These differences are found in the IDirectSound interface as well as the IDirectSound8 interface. Specific differences in the behavior of the newer object include the following:

Requirements

  Header: Declared in dsound.h.

See Also