Help - Search - Members - Calendar
Full Version: ReplayGain Floating point format
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
JonD
Hi,

I'm just in the process of adding support for the replay gain fields in the Lame tag to EncSpot.

Does anyone know how the 32 bit floating point 'peak amplitude' value is stored? Maybe I am going crazy, but it does not seem to be in IEEE 754 format. The docs on replay gain say things like 'TODO : say more about floating point format' smile.gif


Of course I could start digging around in the Lame source code... but if anyone has a quick easy answer/link, it's be really helpful....

cheers,
-jon
metaller
/* peak sample */
if(gfc->findPeakSample)
nPeakSignalAmplitude = abs((int)((((FLOAT)gfc->PeakSample) / 32767.0 ) * pow(2,23) +.5));
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.