Starts loudness measurement on a channel.
HLOUDNESS BASS_Loudness_Start( DWORD handle, DWORD flags, int priority );
handle | The channel handle... a HSTREAM, HMUSIC, or HRECORD. | ||||||||||||
flags | A combination of these flags.
| ||||||||||||
priority | 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. |
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_MEM | There is insufficient memory. |
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. 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.
handle = BASS_Loudness_Start(channel, BASS_LOUDNESS_INTEGRATED | BASS_LOUDNESS_RANGE, -10);
Start measuring the loudness of up to 3 seconds of a channel, with DSP priority -20.
handle = BASS_Loudness_Start(channel, MAKELONG(BASS_LOUDNESS_CURRENT, 3000), -20);