Copyright © 2008-2019 MultiMedia Soft

TracksPositionsDetect method

Previous pageReturn to chapter overviewNext page

Remarks

 

Detects positions of tracks, containing audible sound, separated by silent partitions inside the loaded sound and store them inside a list.

The list of detected tracks can be enumerated at a later time through the TracksPositionsNumGet and TracksPositionsRangeGet methods. Once detection is completed, the TracksPositionsRangeAttachToNext method could be used in case you should need to attach two tracks and consider them as a single track.

 

Tracks detection can be canceled at any time through the TracksPositionsCancelDetect method.

 

A successful call to this method will fire the TracksPosDetectionStarted event followed by a number of TracksPosDetectionPerc events and finally by the TracksPosDetectionDone event.

 

 

Syntax

 

[Visual Basic]

Public Function TracksPositionsDetect (

nSilenceThreshold as Int16,

nSilenceMinLength as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes TracksPositionsDetect (

Int16 nSilenceThreshold,

Int32 nSilenceMinLength

);


 

[C++]

public: enumErrorCodes TracksPositionsDetect (

Int16 nSilenceThreshold,

Int32 nSilenceMinLength

);


 

 

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

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. Check the LastError property value in order to see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.