BASS.NET API for the Un4seen BASS Audio LibraryWaveFormGetNormalizationGain Method BASS.NET API for the Un4seen BASS Audio Library
Determines a gain factor (normalization), so that the maximum peak level of the sample data will be at 0 dB.

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public float GetNormalizationGain(
	int frameStart,
	int frameEnd,
	ref float peak
)

Parameters

frameStart
Type: SystemInt32
The frame position where to start the calculation (between 0 and FramesRendered, or -1 to scan from the beginning).
frameEnd
Type: SystemInt32
The frame position til where to perform the calculation (between 0 and FramesRendered, or -1 to scan til the end; must be bigger than frameStart).
peak
Type: SystemSingle
Returns the maximum peak level as a float value between 0.0 (silence) and 1.0 (0dB).

Return Value

Type: Single
The gain factor as a float value.
Remarks

You might use the gain factor as a multiplier to the sample data to apply a volume adjustment, so that the maximum peak level of the audio samples is at 0 dB.
See Also

Reference