Copyright © 2011-2019 MultiMedia Soft

TrimSilenceEnhanced method

Previous pageReturn to chapter overviewNext page

Remarks

 

Detects and removes silent portions found at the beginning and at the end of the loaded sound.

In order to remove any portions of silence from the loaded sound you should use the RemoveSilence method.

During the execution of the editing session the CallbackEditPerc delegate is invoked in order to notify about the percentage of advancement.

 

For further details about callback delegates see the How to synchronize the container application with the API tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function TrimSilenceEnhanced (

nSilenceThresholdInitial as Int16,

nSilenceThresholdFinal as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes TrimSilenceEnhanced (

Int16 nSilenceThresholdInitial,

Int16 nSilenceThresholdFinal

);


 

[C++]

public: enumErrorCodes TrimSilenceEnhanced (

Int16 nSilenceThresholdInitial,

Int16 nSilenceThresholdFinal

);


 

 

Parameter

Description

 

 

nSilenceThresholdInitial

Number representing the silence threshold referred to the volume level for the initial portion of the loaded sound. Supported values are expressed with a linear volume in the range from 0 to 32767. If for example you should set a value of 800, any portion of sound having a volume level lower than 800 would be considered as silent.

In case you should need to set a threshold value expressed in dB, before setting this parameter you could convert the value in dB into a linear value through the following formula (C syntax):

ValueLinear = 32767 * pow (10, ValueInDB/20);

nSilenceThresholdFinal

Number representing the silence threshold referred to the volume level for the final portion of the loaded sound.

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.