Starts loudness measurement on a channel.
Namespace: Un4seen.Bass.AddOn.Loud
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.18.2
Syntax
[DllImportAttribute("bassloud")] public static bool BASS_Loudness_GetLevel( int handle, BassLoudness mode, ref float level )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. - mode
- Type: Un4seen.Bass.AddOn.LoudBassLoudness
The measurement type to retrieve. One of the following BassLoudness:BASS_LOUDNESS_CURRENT Loudness in LUFS of the last 400ms or the duration (in milliseconds) specified in the HIWORD (use MakeLong(Int16, Int16)). BASS_LOUDNESS_INTEGRATED Integrated loudness in LUFS. This is the average since measurement started. BASS_LOUDNESS_RANGE Loudness range in LU. BASS_LOUDNESS_PEAK Peak level in linear scale. BASS_LOUDNESS_TRUEPEAK True peak level in linear scale. - level
- Type: SystemSingle
The returned single measurement level (eg. weighted over all channels, stereo, 5.1 etc.).
Return Value
Type: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
The BASS_LOUDNESS_CURRENT mode can be used with durations of 400ms and 3000ms to get EBU R128 "momentary" and "short-term" loudness levels, respectively. The other modes are equivalent to the EBU R128 measurements of the same name.
| ERROR CODE | Description |
|---|---|
| BASS_ERROR_HANDLE | handle is not valid. |
| BASS_ERROR_ILLPARAM | mode is not valid. If requesting a duration with BASS_LOUDNESS_CURRENT then it exceeds what has been enabled. |
| BASS_ERROR_NOTAVAIL | The requested measurement has not been enabled. |
See Also