SecondaryBuffer.GetObjectInPath Method

Language:

Note: This documentation is preliminary and is subject to change.

Retrieves a Microsoft® DirectSound® effect object at a particular index from a SecondaryBuffer object.

Definition

Visual Basic .NET Public Function GetObjectInPath( _
    ByVal guidObject As Guid, _
    ByVal index As Integer, _
    ByVal guidInterface As Guid _
) As Object
C# public object GetObjectInPath(
    Guid guidObject,
    int index,
    Guid guidInterface
);
Managed C++ public: Object* GetObjectInPath(
    Guid guidObject,
    int index,
    Guid guidInterface
);
JScript .NET public function GetObjectInPath(
    guidObject : Guid,
    index : int,
    guidInterface : Guid
) : Object;

Parameters

guidObject System.Guid. Unique class identifier of the object being searched for, such as DSoundHelper.StandardEchoGuid.
index System.Int32. Index of Microsoft® DirectSound® effect object to retrieve from the SecondaryBuffer object.
guidInterface System.Guid. Unique identifier of the desired interface, such as DSoundHelper.InterfaceEffectsEcho

Return Value

System.Object . A Microsoft® DirectSound® effect object, such as EchoEffect, from the SecondaryBuffer object you are searching.

Remarks

Any DirectX Media Object (DMO) that has been set on a buffer by using SetEffects method can be retrieved, even if it has not been allocated resources.

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

Effect guidObject guidInterface
ChorusEffect DSoundHelper.StandardChorusGuid DSoundHelper.InterfaceEffectsChorus
CompressorEffect DSoundHelper.StandardCompressorGuid DSoundHelper.InterfaceEffectsCompressor
DistortionEffect DSoundHelper.StandardDistortionGuid DSoundHelper.InterfaceEffectsDistortion
EchoEffect DSoundHelper.StandardEchoGuid DSoundHelper.InterfaceEffectsEcho
FlangerEffect DSoundHelper.StandardFlangerGuid DSoundHelper.InterfaceEffectsFlanger
GargleEffect DSoundHelper.StandardGargleGuid DSoundHelper.InterfaceEffectsGargle
Interactive3DLevel2ReverbEffect DSoundHelper.StandardInteractive3DLevel2ReverbGuid DSoundHelper.InterfaceEffectsInteractive3DLevel2Reverb
ParamEqEffect DSoundHelper.StandardParamEqGuid DSoundHelper.InterfaceEffectsParamEq
WavesReverbEffect DSoundHelper.StandardWavesReverbGuid DSoundHelper.InterfaceEffectsWavesReverb

The value of the index is the index of the object within the array of effects passed to SetEffects. 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 guidObject and index. It is up to the application to ensure that guidInterface specifies an interface that can be expected to be found on the object.

Exceptions
ArgumentException Leave Site An invalid parameter was passed to the called method.
ControlUnavailableException The buffer control (volume, pan, and so on) requested by the caller is not available. Controls must be specified when the buffer is created.
ObjectNotFoundException The requested object was not found.
SoundException Root exception type for all Microsoft® DirectSound® Exceptions. Derives from DirectXException.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.