diff options
-rw-r--r-- | volume.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -64,7 +64,10 @@ volume_get_amp (void) { float db_to_amp (float dB) { - return pow (10, dB/20.f); +// return pow (10, dB/20.f); + // thanks to he for this hack + const float ln10=2.3025850929940002f; + return exp(ln10*dB/20.f); } float |