Forte is more picky about how the pow() and log() functions are called.
authorBrian Cameron <brian.cameron@sun.com>
Thu, 22 May 2003 16:51:37 +0000 (16:51 +0000)
committerBrian Cameron <brian.cameron@sun.com>
Thu, 22 May 2003 16:51:37 +0000 (16:51 +0000)
Original commit message from CVS:
Forte is more picky about how the pow() and log() functions are called.

gst/modplug/libmodplug/snd_flt.cpp
gst/modplug/libmodplug/sndfile.cpp

index 0865e59..bcae202 100644 (file)
@@ -80,7 +80,7 @@ void CSoundFile::SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modif
        float d = (1.0f-2.0f*dmpfac)* fc;
        if (d>2.0) d = 2.0;
        d = (2.0f*dmpfac - d)/fc;
-       float e = pow(1.0f/fc,2.0);
+       float e = pow(1.0f/fc, 2);
 
        fg=1/(1+d+e);
        fb0=(d+e+e)/(1+d+e);
index c4db8bc..7e31062 100644 (file)
@@ -1622,7 +1622,7 @@ DWORD CSoundFile::TransposeToFrequency(int transp, int ftune)
 //-----------------------------------------------------------
 {
        //---GCCFIX:  Removed assembly.
-       return (DWORD)(8363*pow(2, (transp*128+ftune)/(1536)));
+       return (DWORD)(8363*pow(2.0, (transp*128+ftune)/(1536)));
 
 #ifdef MSC_VER
        const float _fbase = 8363;
@@ -1662,7 +1662,7 @@ int CSoundFile::FrequencyToTranspose(DWORD freq)
 //----------------------------------------------
 {
        //---GCCFIX:  Removed assembly.
-       return int(1536*(log(freq/8363)/log(2)));
+       return int(1536*(log(freq/8363.0)/log(2.0)));
 
 #ifdef MSC_VER
        const float _f1_8363 = 1.0f / 8363.0f;