Copyright © 2006-2019 MultiMedia Soft

RecordedSound.TrimSilence method

Previous pageReturn to chapter overviewNext page

Remarks

 

Requests to edit the recorded sound deleting the given sound range.

 

A successful call to this method will fire the SoundEditStarted event. Once this editing operation has been performed completely, the control will fire the SoundEditDone event.

 

For further details about recorded sound methods refer to the RecordedSound class section.

For further details see the How to perform a recording session section.

 

 

Syntax

 

[Visual Basic]

Public Function TrimSilence (

nSilenceThreshold as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes TrimSilence (

Int16 nSilenceThreshold

);


 

[C++]

public: enumErrorCodes TrimSilence (

Int16 nSilenceThreshold

);


 

Parameter

Description

 

 

nSilenceThreshold

Number representing the silence threshold referred to the volume level. 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);

 

In case you should need to define different thresholds for the initial and final portions of the recorded sound, use the RecordedSound.TrimSilenceEnhanced method.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred. Check the LastError property value in order to see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.