BASS_Init(-1, 44100, 0, 0, NULL);
BASS_SetVolume(vol);
BASS_GetVolume()
I'm using newest BASS release.
I tested a number of values and looked at the volume of Windows that corresponded to them.
BASS Windows
0.001 0.01
0.002 0.02
0.003 0.02
0.004 0.03
0.005 0.04
0.005 0.04
0.007 0.05
0.008 0.05
0.009 0.05
0.02 0.09
0.03 0.12
0.04 0.15
0.05 0.17
0.1 0.26
0.2 0.39
0.3 0.5
0.4 0.59
0.5 0.67
0.6 0.74
0.7 0.81
0.8 0.88
0.9 0.94
1 1
Why BASS_GetVolume() doesn't return the same value as Windows11 shows?
How to make the BASS volume map to Windows volume?
Now, I use a fitting func Windows_Volume=1.2119*BASS_Volume^0.6607
The reason I use BASS_SetVolume is: When switching output devices, the volume of the device switched to may be zero, so I need to adjust the volume of the device (ChannelSetAttribute(BASS_ATTRIB_VOL) only affect the channel, not the device).