How to use Bass_ASIO_ChannelGetLevel to get the level of a given channel in DBFS

Started by kanstey,

kanstey

Hi All,
I am working on a simple software meter to monitor channel levels from my ASIO devices and I have been able to use the BASS ASIO Library to get levels for the input channels of a given device using code like the following:

float level = BASS_ASIO_ChannelGetLevel(FALSE, 0); // get the linear level for channel 0 in this case
float dblevel = (level > 0 ? 20 * log10(level) : -HUGE_VAL); // translate it to dB

This works with no issues and produces the value in DB, which is obviously typically a negative value as expected.
I have seen a number of similar applications that produce their values in DBFS as opposed to DB.

I have trying to determine how to go about obtaining the value in DBFS.
Based on quite a bit of reading online, I understand (I think) that there is no direct correlation between the two "scales", but I am looking for (at least) some way to obtain an approximate value.

Any help would be greatly appreciated.


Ian @ un4seen

The code above is actually giving a dBFS value. "dB" will often be written instead just because it's shorter.