Copyright © 2005-2019 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 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 CallbackForPlayersEvents delegate which is invoked with the nEvent parameter set to EV_SILENCE_AVAIL.

 

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]

Public Function SilenceDetectionOnPlayerRequest (

nPlayerIndex as Int16,

nThresholdInitial as Int32,

nThresholdFinal as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes SilenceDetectionOnPlayerRequest (

Int16 nPlayerIndex,

Int32 nThresholdInitial,

Int32 nThresholdFinal

);


 

[C++]

public: enumErrorCodes SilenceDetectionOnPlayerRequest (

Int16 nPlayerIndex,

Int32 nThresholdInitial,

Int32 nThresholdFinal

);


 

 

Parameter

Description

 

 

nPlayerIndex

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.NOERROR (0

The method call was successful.