Home » Questions » transform from db to fmod's volume
How I can transform volume in db to fmod’s volume?
I can’t find any function in your api to do this.
You can try to use that function… You can pass in a float value from 0 to 1 to sample2dB, it will return dB values from -inf to 0 dB.
float sample2dB(float sample)
return 20 * log10(sample);
Oups… I guess you were looking for that function… you should pass values from -inf to 0.
float dB2Sample(float dB)
return pow(10.0f, dB/20.f);
Please login first to submit.
Copyright 2018 FIRELIGHT TECHNOLOGIES PTY LTD. All RIGHTS RESERVED.