Retrieves the level (peak amplitude) of a channel.
float BASS_ASIO_ChannelGetLevel( BOOL input, DWORD channel );
|input||Dealing with an input channel? FALSE = an output channel.|
|channel||The input/output channel number... 0 = first.|
|BASS_ERROR_INIT||BASS_ASIO_Init has not been successfully called.|
|BASS_ERROR_ILLPARAM||The input and channel combination is invalid.|
|BASS_ERROR_START||The device has not been started, or the channel is not enabled.|
|BASS_ERROR_FORMAT||Level retrieval is not supported for the channel's sample format.|
Volume settings made via BASS_ASIO_ChannelSetVolume affect the level reading of output channels, but not input channels.
When an input channel is paused, it is still possible to get its current level. Paused output channels will have a level of 0.
Level retrieval is not supported when the sample format is DSD.
float level=BASS_ASIO_ChannelGetLevel(FALSE, 0); // get the linear level float dblevel=(level>0?20*log10(level):-1000); // translate it to dB