shithub: opus-tools

Download patch

ref: 5db3932b157d501a27dbbf82975384a605a5907a
parent: ff18ca16367d9f4326aedd97e0377494ee12ffa7
author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
date: Tue Aug 9 18:17:15 EDT 2011

Now with non insane dB->gain calculation

--- a/src/opusdec.c
+++ b/src/opusdec.c
@@ -321,7 +321,7 @@
       return NULL;
    }
 
-   *gain = pow(20., header.gain/2560.);
+   *gain = pow(10., header.gain/5120.);
 
    if (header.gain!=0)
       printf("Playback gain: %f (%f dB)\n", *gain, header.gain/256.);