BASS_GetDSoundObject

Retrieves a pointer to a DirectSound object interface.

void *WINAPI BASS_GetDSoundObject(
    DWORD object
);

Parameters
objectThe interface to retrieve, one of the following.
BASS_OBJECT_DSRetrieve the IDirectSound interface.
BASS_OBJECT_DS3DLRetrieve the IDirectSound3DListener interface.

Return value
If succesful, then a pointer to the requested object is returned, otherwise NULL is returned. Use BASS_ErrorGetCode to get the error code.

Error codes
BASS_ERROR_INITBASS_Init has not been successfully called.
BASS_ERROR_ILLPARAMobject is invalid.
BASS_ERROR_NO3DThe device was not initialized with 3D support.

Remarks
This function allows those that are familiar with DirectSound to access to the internal DirectSound object interfaces, so that extra external functionality can be "plugged" into BASS. If you create any objects through a retrieved interface, make sure you release the objects before calling BASS_Free.

See the DirectX SDK for information on the DirectSound interfaces.

Example
To set the speaker configuration to "headphones".

#include <dsound.h>
...
IDirectSound *ds=BASS_GetDSoundObject(BASS_OBJECT_DS); // get object
IDirectSound_SetSpeakerConfig(ds,DSSPEAKER_HEADPHONE); // headphones

See also
BASS_Init