Copyright © 2001-2018 MultiMedia Soft

SilenceDetectionOnPlayerRequest method

Previous pageReturn to chapter overviewNext page

Remarks

 

Requests the calculation of silent portions at the start and end of the sound loaded inside the given player: useful when the automatic silence detection has been disabled through a call to the SilenceDetectionOnPlayerLoadAutoSet 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 BOOL_FALSE.

 

Silence detection works inside a secondary thread so, once detected, the container application will be notified about initial and final positions of silent portions at the start and end of loaded songs through the SilencePositionAvailable event. If you need to perform silence detection inside the main thread and to have silence positions immediately available after returning from the method call you can use the SilenceDetectionOnPlayer method.

 

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

 

 

Syntax

 

[Visual Basic]

control.SilenceDetectionOnPlayerRequest (

nPlayer as Integer,

nThresholdInitial as Long,

nThresholdFinal as Long

) as enumErrorCodes


 

[C++]

short control.SilenceDetectionOnPlayerRequest (

short nPlayer,

long nThresholdInitial,

long nThresholdFinal

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nThresholdInitial

Number representing the silence threshold at the start of the loaded sound: can assume values from 0 (no sound) to 32767 (max volume).

nThresholdFinal

Number representing the silence threshold at the end of the loaded sound: can assume values from 0 (no sound) to 32767 (max volume).

 

 

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