SilenceDetectionOnFile method |
|
Remarks
Performs the calculation of silent portions at the start and end of the given sound file: differently from the SilenceDetectionOnPlayerRequest and SilenceDetectionOnPlayer methods, the sound file doesn't need to be loaded inside a player.
Supported audio file formats are the same mentioned inside the documentation of the LoadSound method. Video files are not supported by this 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.
For further details about silence detection management see the How to detect silent portions of sound files tutorial.
Syntax
[Visual Basic] control.SilenceDetectionOnFile ( strPathname as String, nThresholdInitial as Long, nThresholdFinal as Long, nInitialPosition as Long, nFinalPosition as Long, nSoundDuration as Long ) as enumErrorCodes |
[C++] short control.SilenceDetectionOnFile ( LPCTSTR strPathname, long nThresholdInitial, long nThresholdFinal, long *nInitialPosition, long *nFinalPosition, long *nSoundDuration ); |
Parameter |
Description |
|
|
strPathname |
Absolute pathname of the sound file to analyze. |
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). |
nInitialPosition |
Reference that, on return from the method call, will contain the detected position, expressed in milliseconds, where audible sound begins. |
nFinalPosition |
Reference that, on return from the method call, will contain the detected position, expressed in milliseconds, where audible sound ends. |
nSoundDuration |
Reference that, on return from the method call, will contain the duration, expressed in milliseconds, of the sound file being analyzed. |
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 |