[xiph-cvs] cvs commit: vorbis/lib scales.h

Michael Smith msmith at xiph.org
Sat Dec 23 22:04:15 PST 2000



msmith      00/12/23 22:04:14

  Modified:    lib      scales.h
  Log:
  MSVC has a broken preprocessor, and doesn't know how to do macro expansion
  correctly. Workaround this.

Revision  Changes    Path
1.10      +4 -4      vorbis/lib/scales.h

Index: scales.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/scales.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- scales.h	2000/12/21 21:04:41	1.9
+++ scales.h	2000/12/24 06:04:14	1.10
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: linear scale -> dB, Bark and Mel scales
- last mod: $Id: scales.h,v 1.9 2000/12/21 21:04:41 xiphmont Exp $
+ last mod: $Id: scales.h,v 1.10 2000/12/24 06:04:14 msmith Exp $
 
  ********************************************************************/
 
@@ -37,15 +37,15 @@
 
    all f in Hz, z in Bark */
 
-#define toBARK(f)   (13.1f*atan(.00074f*(f))+2.24f*atan((f)*(f)*1.85e-8f)+1e-4f*(f))
+#define toBARK(f)   (13.1F*atan(.00074F*(f))+2.24F*atan((f)*(f)*1.85e-8F)+1e-4F*(f))
 #define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
-#define toMEL(f)    (log(1.f+(f)*.001f)*1442.695f)
+#define toMEL(f)    (log(1.F+(f)*.001F)*1442.695F)
 #define fromMEL(m)  (1000.f*exp((m)/1442.695f)-1000.f)
 
 /* Frequency to octave.  We arbitrarily declare 125.0 Hz to be octave
    0.0 */
 
-#define toOC(f)     (log(f)*1.442695f-6.965784f)
+#define toOC(f)     (log(f)*1.442695F-6.965784F)
 #define fromOC(o)   (exp(((o)+6.965784f)*.693147f))
 
 #endif

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list