Copyright © 2001-2018 MultiMedia Soft

SilenceDetectionRealTimeParamsSet method

Previous pageReturn to chapter overviewNext page



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.





[Visual Basic]

control.SilenceDetectionRealTimeParamsSet (

nPlayerIndex as Integer,

nSilenceThreshold as Long,

nSilenceMinLength as Long

) as enumErrorCodes



short control.SilenceDetectionRealTimeParamsSet (

short nPlayerIndex,

long nSilenceThreshold,

long nSilenceMinLength









Number representing the zero-based index of the involved player


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);


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






Negative value

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

enumErrorCodes.NOERROR (0

The method call was successful.