Hi all, I add volume controls to my game via the usage of sliders however it doesnt feel right when using them, does anyone know how to control a audio mixer with a linear volume scale or how to convert 0-1 to work correctly in decibels? (as if you were modifying an audio source)
Thanks
I don’t know of any in built functions/methods to do what you are asking but the equation for converting a dB value to a float value is:
10^(x / 20) = y
…where “x” is the value in dB you want to convert, and “y” is the base 10 result
The Wikipedia article on Decibels also has a handy chart.
I would start there, and with a quick forum search. There are a few threads on this already
Don’t hesitate to ask if you have any questions! Good luck
Ah, thank you, that really helps
I can see from graphing it that decibels is a logarithmic curve, this means that it never actually reaches 0, am I correct? If so, is it like this because of how your ears can differentiate smaller differences in sound the quieter it is?
Im assuming, if I convert 0-1 to a decibal, 0 will actually mute it? or will it just make it very quiet due to its logarithmic nature
Also, I don’t really understand +Db, could you explain this to me? How you can go over the maximum volume? Should this be used, does it cause clipping?
Again, thanks for helping (I will now try to get it setup)
Also, am I correct in saying that x=20*Log10(y)?
Got it all done, works like a charm
Thanks for the help