With one of my speaker (16bit, 48khz) attached to windows 11 system. I get can get the channel volume level using IAudioEndpointVolumeEx->GetVolumeRangeChannel as below:
Min Volume: -63.50 dB, Max Volume: 0.00 dB, incremental: 0.03 dB
And when I set the volume scale as 0.5 (50% showing on the slide bar of volume control), I can get the volume level in decibels(dB) and in scale with IAudioEndpointVolume->GetChannelVolumeLevel() and IAudioEndpointVolume->GetChannelVolumeLevelScalar()
In my case of the given speaker, the value is -10.304707 dB and 0.5000.
Now I am trying to calculate the scale value by the given decibel value, with the given formula A = 10^(dB/20) (based on the doc https://learn.microsoft.com/en-us/windows/win32/coreaudio/audio-tapered-volume-controls), I can only get the scale value at around 0.305 instead of 0.5.
So it looks like the formula is not correct for my case. My question is, what is the formula I can use to do such conversion from the dB value to scale value? I need this as in my project I can only sent the decibel value remotely and then do the conversion there. Please let me know if the information I have provided here is not enough and I will provide more as suggested. Thanks.