Microsoft DirectX 8.1 (C++)

IDirectSound8

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

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.

Buffer creation

Method Description
CreateSoundBuffer Creates a DirectSoundBuffer object to hold a sequence of audio samples.
DuplicateSoundBuffer Creates a new DirectSoundBuffer object that duplicates or shares the original buffer's memory.

Devices

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.
GetCaps Retrieves the capabilities of the hardware device that is represented by the DirectSound object.
VerifyCertification Ascertains whether the DirectSound device is certified for DirectX.

Initialization

Method Description
Initialize Initializes a DirectSound object that was created by using the CoCreateInstance function.
SetCooperativeLevel Sets the cooperative level of the application for this sound device.

Speaker configuration

Method Description
GetSpeakerConfig Retrieves the speaker configuration.
SetSpeakerConfig Specifies the speaker configuration of the DirectSound object.

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 DirectSound objects created by DirectSoundCreate8 and DirectSoundFullDuplexCreate8 fall into this category. Objects of class CLSID_DirectSound, which include all those created by using DirectSoundCreate, support only the earlier IDirectSound interface.

The behavior of CLSID_DirectSound8 objects is somewhat different than 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.