BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_GetDSoundObject Method (Int32)BASS.NET API for the Un4seen BASS Audio Library
Retrieves a pointer to a DirectSound object interface.

Not recommended to be used by managed applications!

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)]
public static IntPtr BASS_GetDSoundObject(
	int handle
)

Parameters

handle
Type: SystemInt32
The interface to retrieve.

This can be a HMUSIC / HSTREAM / HCHANNEL handle, in which case an IDirectSoundBuffer interface is returned, or one of the following (see BASSDirectSound):

BASS_OBJECT_DSRetrieve the IDirectSound interface.
BASS_OBJECT_DS3DLRetrieve the IDirectSound3DListener interface.

Return Value

Type: IntPtr
If succesful, then a pointer to the requested object is returned, otherwise is returned. Use BASS_ErrorGetCode to get the error code.
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(Int32)) determines which device this function call applies to.

ERROR CODEDescription
BASS_ERROR_INITBASS_Init(Int32, Int32, BASSInit, IntPtr, IntPtr) has not been successfully called.
BASS_ERROR_ILLPARAMhandle is invalid.
BASS_ERROR_NOTAVAILThe requested object is not available with the current device.

See Also

Reference