BASS_Loudness_GetLevelMulti

Retrieves the level of multiple loudness measurements combined.

BOOL BASS_Loudness_GetLevelMulti(
    HLOUDNESS *handles,
    DWORD count,
    DWORD mode,
    float *level
);

Parameters

handlesAn array of loudness measurement handles.
countThe number of handles in the array.
modeThe measurement type to retrieve. One of the following.
BASS_LOUDNESS_INTEGRATEDIntegrated loudness in LUFS.
BASS_LOUDNESS_RANGELoudness range in LU.
BASS_LOUDNESS_PEAKPeak level in linear scale.
BASS_LOUDNESS_TRUEPEAKTrue peak level in linear scale.
levelPointer to a variable to receive the measurement level.

Return value

If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Remarks

This function is identical to BASS_Loudness_GetLevel but with the ability to combine the data from multiple measurements, which can be useful for getting the overall loudness (or peak) of a group of files. Combining the measurements of multiple files is equivalent to putting those files through the same measurement one after another.

The BASS_LOUDNESS_CURRENT mode is not available when combining multiple measurements.

Error codes

BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_ILLPARAMmode is not valid.
BASS_ERROR_NOTAVAILThe requested measurement has not been enabled. It needs to be enabled on all of the provided handles.

Example

Get the level of 2 integrated loudness measurements combined.
HLOUDNESS handles[2] = { handle1, handle2 }; // the measurement handles
float level;
BASS_Loudness_GetLevelMulti(handles, 2, BASS_LOUDNESS_INTEGRATED, &level); // get the combined loudness level

See also

BASS_Loudness_GetLevel, BASS_Loudness_Start