Determines a gain factor (normalization), so that the maximum peak level of the stream will be at 0 dB.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static float GetNormalizationGain( string filename, float blockSize, double startpos, double endpos, ref float peak )
Parameters
- filename
- Type: SystemString
The audio file to analyze. - blockSize
- Type: SystemSingle
The block-size in seconds which will be used to scan the file (between 0.1 and 30 seconds). - startpos
- Type: SystemDouble
The position (in seconds) where to start the calculation (between 0 and file duration, or -1 to scan from the beginning). - endpos
- Type: SystemDouble
The position (in seconds) til where to perform the calculation (between 0 and file duration, or -1 to scan til the end; must be bigger than startpos). - peak
- Type: SystemSingle
Returns the maximum peak level as a float value between 0.0 (silence) and 1.0 (0dB).
Return Value
Type: SingleThe gain factor as a float value (or -1 on error) - a value of 1 means no amplification.
Remarks
See Also