Microsoft DirectX 9.0

IDirectSoundBuffer8::GetObjectInPath

The GetObjectInPath method retrieves an interface for an effect object associated with the buffer.

Syntax

HRESULT GetObjectInPath(
  REFGUID rguidObject, 
  DWORD dwIndex, 
  REFGUID rguidInterface, 
  LPVOID * ppObject
);

Parameters

rguidObject

Unique class identifier of the object being searched for, such as GUID_DSFX_STANDARD_ECHO. Set this parameter to GUID_All_Objects to search for objects of any class.

dwIndex

Index of the object within objects of that class in the path. See Remarks.

rguidInterface

Unique identifier of the desired interface. See Remarks.

ppObject

Address of a variable that receives the desired interface pointer.

Return Values

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_INVALIDPARAM
DSERR_OBJECTNOTFOUND
E_NOINTERFACE

Remarks

Any DMO that has been set on a buffer by using IDirectSoundBuffer8::SetFX can be retrieved, even it has not been allocated resources.

The following interfaces can be retrieved for the various DMOs supplied with DirectX.

rguidInterface *ppObject
IID_IDirectSoundFXGargle8 IDirectSoundFXGargle8
IID_IDirectSoundFXChorus8 IDirectSoundFXChorus8
IID_IDirectSoundFXFlanger8 IDirectSoundFXFlanger8
IID_IDirectSoundFXEcho8 IDirectSoundFXEcho8
IID_IDirectSoundFXDistortion8 IDirectSoundFXDistortion8
IID_IDirectSoundFXCompressor8 IDirectSoundFXCompressor8
IID_IDirectSoundFXParamEq8 IDirectSoundFXParamEq8
IID_IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb8
IID_IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb8

In addition, the following interfaces are available for any of the standard DMOs. For information on these interfaces, see the Help for DirectX Media Objects.

rguidInterface *ppObject
IID_IMediaObject IMediaObject
IID_IMediaObjectInPlace IMediaObjectInPlace
IID_IMediaParams IMediaParams

Note   When the DirectSound API is used to play buffers, parameter curves (envelopes) set by using the IMediaParams interface do not work, because DirectSound does not timestamp the DMO buffers.

The value in dwIndex is the index of the object within the array of effects passed to IDirectSoundBuffer8::SetFX. This is not necessarily the actual position of the object in the effects chain, because some effects might not have been created.

An object is returned solely on the basis of whether it matches rguidObject and dwIndex. It is up to the application to ensure that rguidInterface specifies an interface that can be expected to be found on the object.

Requirements

  Header: Declared in dsound.h.

See Also