Copyright © 2005-2019 MultiMedia Soft

PeakDetectionOnPlayer method

Previous pageReturn to chapter overviewNext page



Gets the highest peak of the sound currently loaded inside the given player.

The returned value can be used with the Effects.NormalizationPeakSet method to speed up a later loading of a sound file when normalization has been enabled through the Effects.NormalizationEnable method.


Differently from the PeakDetectionOnPlayerRequest method, the value of the highest peak is immediately available when this method returns to the caller.


See the How to apply special effects to a playing sound section for further details.





[Visual Basic]

Public Function PeakDetectionOnPlayer (

nPlayerIndex as Int16,

ByRef fPeak as Single

) as enumErrorCodes



public enumErrorCodes PeakDetectionOnPlayer (

Int16 nPlayerIndex,

ref float fPeak




public: enumErrorCodes PeakDetectionOnPlayer (

Int16 nPlayerIndex,

float __gc *fPeak








Number representing the zero-based index of the involved player


Reference that, on return from the method call, will contain a floating point value representing the highest peak value.

The value can be in the range from 0.0 to 1.0



Return value






Negative value

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

enumErrorCodes.NOERROR (0)

The method call was successful