Copyright © 2005-2019 MultiMedia Soft

Effects.DirectXEffectApply method

Previous pageReturn to chapter overviewNext page

Remarks

 

Applies a specific DMO (DirectX Media Object) effect to the playing sound. Parameters related to the chosen effect can be retrieved through the Effects.DirectXEffectParamsGet method and modified through the Effects.DirectXEffectParamsSet method.

The same DMO effect can be removed through the Effects.DirectXEffectReset method.

 

DirectX effects requires the availability of DirectX version 8 or higher on the target system and can be applied only if the IsDirectX8Available method returns TRUE.

 

See the How to apply special effects to a playing sound section for further details.

 

 

Syntax

 

[Visual Basic]

Public DirectXEffectApply (

nPlayerIndex as Int16,

nEffect as enumDirectXEffects,

nPriority as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes DirectXEffectApply (

Int16 nPlayerIndex,

enumDirectXEffects nEffect,

Int16 nPriority

);


 

[C++]

public: enumErrorCodes DirectXEffectApply (

Int16 nPlayerIndex,

enumDirectXEffects nEffect,

Int16 nPriority

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nEffect

Numeric value that determines the effect to apply.

Supported values are the following:

Mnemonic value

Value

Meaning

DX_CHORUS

0

Chorus

DX_COMPRESSOR

1

Compressor

DX_DISTORTION

2

Distortion

DX_ECHO

3

Echo

DX_FLANGER

4

Flanger

DX_GARGLE

5

Gargle

DX_I3DL2REVERB

6

I3DL2 environmental reverb

DX_REVERB

8

Wave reverb

nPriority

Effect's priority inside the chain of DirectX effects, custom DSP effects and VST effects. Effects with higher priority are applied before effects with lower priority; in case more effects should have the same priority, they would be invoked in the same order that they were added.

This parameter is ignored when the bSet parameter is set to "false".

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.