Hi there,
i am currently struggling with the BASS_GetVolume function.
I have two different issues. One that affects Windows systems and the other a linux arm system (Raspbian Buster on a Rpi Model 3b).
On Raspbian retrieving the volume works one time and it returns the expected value, but afterwards it doesn't change if the volume is changed outside the program. Only after calling Bass_SetVolume the value is updated to the new value.
But changing the systemvolume with amixer (amixer set Master xx%) or setting it from the volume control at the taskbar it doesn't get updated. Only after restarting the app it works for one time.
Is there any trick i can do to force it getting the master volume of the system?
Running this on windows seems fine. It updates the volume if i change it from the taskbar or with the keyboard volume control.
But the result is not matching the value that can be seen at the volume control.
I know that there is a thread where it is mentioned that the visible volume control does some magic calculation before displaying them.
Does anybody know how this value is calculated?
I created a function (c#) that result usable values:
(float)Math.Round(Math.Pow((((Bass.BASS_GetVolume() * 100) - 0.008) / 0.0320827), (1 / 1.746994))) / 100f
But this feels like a dirty hack and if you set the round function to use 2 more digits the result will be up to 0.001f from the expected result. This issue is not that critical for me. It is more a nice to have.
I would be happy about any idea.