The DirectSoundCreate8 function creates and initializes an object that supports the IDirectSound8 interface.
HRESULT DirectSoundCreate8( LPCGUID lpcGuidDevice, LPDIRECTSOUND8 * ppDS8, LPUNKNOWN pUnkOuter );
Value | Description |
---|---|
DSDEVID_DefaultPlayback | System-wide default audio playback device. Equivalent to NULL. |
DSDEVID_DefaultVoicePlayback | Default voice playback device. |
If the function succeeds, it returns DS_OK. If it fails, the return value may be one of the following.
Return Code |
---|
DSERR_ALLOCATED |
DSERR_INVALIDPARAM |
DSERR_NOAGGREGATION |
DSERR_NODRIVER |
DSERR_OUTOFMEMORY |
The application must call the IDirectSound8::SetCooperativeLevel method immediately after creating a device object.
Header: Declared in Dsound.h.
Import Library: Use Dsound.lib.
IDirectSound8::GetCaps | IDirectSound8::SetCooperativeLevel | Creating the Device Object