Copyright © 2005-2019 MultiMedia Soft

SilenceDetectionRealTimeParamsSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets parameters of realtime silence detection which can be enabled through the SilenceDetectionRealTimeEnable method.

 

This method doesn't work with sounds with more than 2 channels (5.1 or 7.1) or if the EnableMixingFeatures property has been set to "false".

 

For further details about silence detection management see the How to detect silent portions of sound files tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function SilenceDetectionRealTimeParamsSet (

nPlayerIndex as Int16,

nSilenceThreshold as Int32,

nSilenceMinLength as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes SilenceDetectionRealTimeParamsSet (

Int16 nPlayerIndex,

Int32 nSilenceThreshold,

Int32 nSilenceMinLength

);


 

[C++]

public: enumErrorCodes SilenceDetectionRealTimeParamsSet (

Int16 nPlayerIndex,

Int32 nSilenceThreshold,

Int32 nSilenceMinLength

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nSilenceThreshold

Number representing the silence threshold referred to the volume level. Supported values are expressed with a linear volume in the range from 0 (no sound) to 32767 (max volume). 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);

nSilenceMinLength

Number representing the minimal length of silence expressed in milliseconds. If for example you wish to consider as "silent" only those portions of sound whose duration is above one second, you would have to set this value to 1000.

 

 

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.