BASS_GetDSoundObject
Retrieves a pointer to a DirectSound object interface.
void *BASS_GetDSoundObject( DWORD object );
Parameters
object | The interface to retrieve. This can be a HCHANNEL, HMUSIC or HSTREAM handle, in which case an IDirectSoundBuffer interface is returned, or one of the following.
|
Return value
If successful, 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_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_ILLPARAM | object is invalid. |
BASS_ERROR_NOTAVAIL | The requested object is not available with the current device. |
Remarks
This function allows those that are familiar with DirectSound to access 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.
When using multiple devices, and requesting either the BASS_OBJECT_DS or BASS_OBJECT_DS3DL object interfaces, the current thread's device setting (as set with BASS_SetDevice) determines which device this function call applies to.
Platform-specific
DirectSound in a Windows thing, so this function is not available on other platforms.Example
Set the speaker configuration to "headphones".#include <dsound.h> ... IDirectSound *ds=BASS_GetDSoundObject(BASS_OBJECT_DS); // get object IDirectSound_SetSpeakerConfig(ds, DSSPEAKER_HEADPHONE); // headphones