Copyright © 2001-2018 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 MIDI object section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

control.MIDI.DecayModeSet (

nPlayer as Integer,

bLetDecayOnEnd as enumBoolean,

bLetDecayOnSeek as enumBoolean

) as enumErrorCodes


 

[C++]

short control.MIDI.DecayModeSet (

short nPlayer,

short bLetDecayOnEnd,

short bLetDecayOnSeek

);


 

Parameter

Description

 

 

nPlayer

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:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

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

BOOL_TRUE

1

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:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

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

BOOL_TRUE

1

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

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful