BASS.NET API for the Un4seen BASS Audio Library

BassLoudBASS_Loudness_Start Method (Int32, BassLoudness, Int32, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Starts loudness measurement on a channel.

Namespace:  Un4seen.Bass.AddOn.Loud
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.18.0
Syntax

public static int BASS_Loudness_Start(
	int handle,
	BassLoudness flags,
	int period,
	int priority
)

Parameters

handle
Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD.
flags
Type: Un4seen.Bass.AddOn.LoudBassLoudness
A combination of these flags BassLoudness:
BASS_LOUDNESS_CURRENTEnable loudness measurement of the last 400ms or up to the duration (in milliseconds) specified by period.
BASS_LOUDNESS_INTEGRATEDEnable integrated loudness measurement.
BASS_LOUDNESS_RANGEEnable loudness range measurement.
BASS_LOUDNESS_PEAKEnable peak level measurement.
BASS_LOUDNESS_TRUEPEAKEnable true peak level measurement.
BASS_LOUDNESS_AUTOFREEAutomatically free the measurement when the channel is freed.
period
Type: SystemInt32
The duration (in milliseconds) of the measurements.
priority
Type: SystemInt32
The DSP priority of the measurements. Any DSP/FX with a higher priority than this will be present in the measurements, while any with lower priority will not. Any with the same priority may or may not be present, depending on which was set first.

Return Value

Type: Int32
The loudness measurement handle is returned if it is successfully started, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

The channel's sample data will be measured during DSP/FX processing, with its position in the DSP chain determined by the priority value. The measurement levels can be retrieved with BASS_Loudness_GetLevel(Int32, BassLoudness, Single) or BASS_Loudness_GetLevelMulti(Int32, Int32, BassLoudness, Single).

Each measurement type may use a bit more CPU and/or memory, so only the ones that are needed should be included in the flags parameter. When no longer needed, a measurement can be stopped and its resources freed with BASS_Loudness_Stop(Int32). The BASS_LOUDNESS_AUTOFREE flag may also be used to have it freed automatically when the channel is. A measurement may also be moved to another channel via BASS_Loudness_SetChannel(Int32, Int32, Int32).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_MEMThere is insufficient memory.

See Also

Reference