Copyright © 2005-2019 MultiMedia Soft

MIDI.DecayModeSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Specifies how the sound will decay at the end of playback or when a position's seek operation is performed.

 

For further details about the use of MIDI protocol see the MIDIMan class section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function DecayModeSet (

nPlayerIndex as Int16,

bLetDecayOnEnd as Boolean,

bLetDecayOnSeek as Boolean

) as enumErrorCodes


 

[C#]

public enumErrorCodes DecayModeSet (

Int16 nPlayerIndex,

bool bLetDecayOnEnd,

bool bLetDecayOnSeek

);


 

[C++]

public: enumErrorCodes DecayModeSet (

Int16 nPlayerIndex,

bool bLetDecayOnEnd,

bool bLetDecayOnSeek

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

bLetDecayOnEnd

Boolean value that specifies if the sound will decay naturally or will be stopped abruptly when the sound playback is completed.

Supported values are the following:

Value

Meaning

false

The sound will be stopped abruptly when the sound playback is completed.

true

The sound will decay naturally when the sound playback is completed.

bLetDecayOnSeek

Boolean value that specifies if the sound will decay naturally or will be stopped abruptly when the sound position is changed through the SeekSound method. If needed, this setting can be overridden by performing the change of playback position through the MIDI.SeekToPosition method and by setting its bLetDecay parameter accordingly.

Supported values are the following:

Value

Meaning

false

The sound will be stopped abruptly when the playback position is modified.

true

The sound will decay naturally when the playback position is modified.

 

 

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.