Advertisement
nezvers

Volume and decibel conversion

Dec 20th, 2021
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. float dBToVolume(float dB){
  2.     return powf(10.0f, 0.05f * dB);
  3. }
  4.  
  5. float VolumeTodB(float volume){
  6.     return 20.0f * log10f(volume);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement