changeset 970:0f294f2b0a9b trunk

[svn] - integer-mode decoding accuracy improvements
author nenolod
date Wed, 26 Apr 2006 10:54:58 -0700
parents 971bd2b03ff5
children 4de9f286bdce
files Plugins/Input/mpg123/common.c Plugins/Input/mpg123/common.h Plugins/Input/mpg123/dct64.c Plugins/Input/mpg123/dct64_i386.c Plugins/Input/mpg123/decode.c Plugins/Input/mpg123/decode_2to1.c Plugins/Input/mpg123/decode_4to1.c Plugins/Input/mpg123/decode_ntom.c Plugins/Input/mpg123/layer1.c Plugins/Input/mpg123/layer2.c Plugins/Input/mpg123/layer3.c Plugins/Input/mpg123/mpg123.c Plugins/Input/mpg123/mpg123.h Plugins/Input/mpg123/tabinit.c
diffstat 14 files changed, 232 insertions(+), 221 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/common.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/common.c	Wed Apr 26 10:54:58 2006 -0700
@@ -79,7 +79,7 @@
 
 /**************************************** 
  * HACK,HACK,HACK: step back <num> frames 
- * can only work if the 'stream' isn't a real stream but a file
+ * can only work if the 'stream' isn't a mpgdec_real stream but a file
 static int stream_back_bytes(int bytes)
 {
 	if (vfs_fseek(filept, -bytes, SEEK_CUR) < 0)
--- a/Plugins/Input/mpg123/common.h	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/common.h	Wed Apr 26 10:54:58 2006 -0700
@@ -1,3 +1,5 @@
+#include "mpg123.h"
+
 /*
  * common.h
  */
@@ -17,4 +19,3 @@
 
 extern void parse_url(const gchar * url, gchar ** user, gchar ** pass,
           gchar ** host, gint * port, gchar ** filename);
-
--- a/Plugins/Input/mpg123/dct64.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/dct64.c	Wed Apr 26 10:54:58 2006 -0700
@@ -14,13 +14,13 @@
 #include "mpg123.h"
 
 void
-mpg123_dct64(real * out0, real * out1, real * samples)
+mpg123_dct64(mpgdec_real * out0, mpgdec_real * out1, mpgdec_real * samples)
 {
-    real bufs[64];
+    mpgdec_real bufs[64];
 
     {
         register int i, j;
-        register real *b1, *b2, *bs, *costab;
+        register mpgdec_real *b1, *b2, *bs, *costab;
 
         b1 = samples;
         bs = bufs;
@@ -87,7 +87,7 @@
         costab = mpg123_pnts[4];
 
         for (j = 8; j; j--) {
-            real v0, v1;
+            mpgdec_real v0, v1;
 
             v0 = *b1++;
             v1 = *b1++;
@@ -102,7 +102,7 @@
     }
 
     {
-        register real *b1;
+        register mpgdec_real *b1;
         register int i;
 
         for (b1 = bufs, i = 8; i; i--, b1 += 4)
--- a/Plugins/Input/mpg123/dct64_i386.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/dct64_i386.c	Wed Apr 26 10:54:58 2006 -0700
@@ -10,11 +10,11 @@
 #include "mpg123.h"
 
 static void
-mpg123_dct64_1(real * out0, real * out1, real * b1, real * b2, real * samples)
+mpg123_dct64_1(mpgdec_real * out0, mpgdec_real * out1, mpgdec_real * b1, mpgdec_real * b2, mpgdec_real * samples)
 {
 
     {
-        register real *costab = mpg123_pnts[0];
+        register mpgdec_real *costab = mpg123_pnts[0];
 
         b1[0x00] = samples[0x00] + samples[0x1F];
         b1[0x1F] = (samples[0x00] - samples[0x1F]) * costab[0x0];
@@ -66,7 +66,7 @@
     }
 
     {
-        register real *costab = mpg123_pnts[1];
+        register mpgdec_real *costab = mpg123_pnts[1];
 
         b2[0x00] = b1[0x00] + b1[0x0F];
         b2[0x0F] = (b1[0x00] - b1[0x0F]) * costab[0];
@@ -104,7 +104,7 @@
     }
 
     {
-        register real *costab = mpg123_pnts[2];
+        register mpgdec_real *costab = mpg123_pnts[2];
 
         b1[0x00] = b2[0x00] + b2[0x07];
         b1[0x07] = (b2[0x00] - b2[0x07]) * costab[0];
@@ -144,8 +144,8 @@
     }
 
     {
-        register real const cos0 = mpg123_pnts[3][0];
-        register real const cos1 = mpg123_pnts[3][1];
+        register mpgdec_real const cos0 = mpg123_pnts[3][0];
+        register mpgdec_real const cos1 = mpg123_pnts[3][1];
 
         b2[0x00] = b1[0x00] + b1[0x03];
         b2[0x03] = (b1[0x00] - b1[0x03]) * cos0;
@@ -189,7 +189,7 @@
     }
 
     {
-        register real const cos0 = mpg123_pnts[4][0];
+        register mpgdec_real const cos0 = mpg123_pnts[4][0];
 
         b1[0x00] = b2[0x00] + b2[0x01];
         b1[0x01] = (b2[0x00] - b2[0x01]) * cos0;
@@ -308,9 +308,9 @@
  * (new) registers for the b1,b2 pointer to the bufs[xx] field
  */
 void
-mpg123_dct64(real * a, real * b, real * c)
+mpg123_dct64(mpgdec_real * a, mpgdec_real * b, mpgdec_real * c)
 {
-    real bufs[0x40];
+    mpgdec_real bufs[0x40];
 
     mpg123_dct64_1(a, b, bufs, bufs + 0x20, c);
 }
--- a/Plugins/Input/mpg123/decode.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/decode.c	Wed Apr 26 10:54:58 2006 -0700
@@ -17,7 +17,7 @@
   else if( (sum) < REAL_MINUS_32768) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
 
-int mpg123_synth_1to1_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp + channel;
@@ -37,7 +37,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -56,7 +56,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_8bit_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -76,7 +76,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -97,7 +97,7 @@
 }
 
 
-int mpg123_synth_1to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
 
@@ -113,14 +113,14 @@
 }
 
 
-int mpg123_synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpg123_synth_1to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
-  static real buffs[2][2][0x110];
+  static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
   static int bo = 1;
   short *samples = (short *) (out+*pnt);
 
-  real *b0,(*buf)[0x110];
+  mpgdec_real *b0,(*buf)[0x110];
   int clip = 0; 
   int bo1;
 
@@ -148,11 +148,11 @@
 
   {
     register int j;
-    real *window = mpg123_decwin + 16 - bo1;
+    mpgdec_real *window = mpg123_decwin + 16 - bo1;
  
     for (j=16;j;j--,window+=0x10,samples+=step)
     {
-      real sum;
+      mpgdec_real sum;
       sum  = REAL_MUL(*window++, *b0++);
       sum -= REAL_MUL(*window++, *b0++);
       sum += REAL_MUL(*window++, *b0++);
@@ -174,7 +174,7 @@
     }
 
     {
-      real sum;
+      mpgdec_real sum;
       sum  = REAL_MUL(window[0x0], b0[0x0]);
       sum += REAL_MUL(window[0x2], b0[0x2]);
       sum += REAL_MUL(window[0x4], b0[0x4]);
@@ -190,7 +190,7 @@
 
     for (j=15;j;j--,b0-=0x20,window-=0x10,samples+=step)
     {
-      real sum;
+      mpgdec_real sum;
       sum = -REAL_MUL(*(--window), *b0++);
       sum -= REAL_MUL(*(--window), *b0++);
       sum -= REAL_MUL(*(--window), *b0++);
--- a/Plugins/Input/mpg123/decode_2to1.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/decode_2to1.c	Wed Apr 26 10:54:58 2006 -0700
@@ -18,7 +18,7 @@
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
 
-int mpg123_synth_2to1_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpg123_synth_2to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp + channel;
@@ -38,7 +38,7 @@
   return ret;
 }
 
-int mpg123_synth_2to1_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_2to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
@@ -58,7 +58,7 @@
 }
 
 
-int mpg123_synth_2to1_8bit_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_2to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
@@ -78,7 +78,7 @@
   return ret;
 }
 
-int mpg123_synth_2to1_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_2to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
@@ -98,7 +98,7 @@
   return ret;
 }
 
-int mpg123_synth_2to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_2to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
 
@@ -113,14 +113,14 @@
   return ret;
 }
 
-int mpg123_synth_2to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpg123_synth_2to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
-  static real buffs[2][2][0x110];
+  static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
   static int bo = 1;
   short *samples = (short *) (out + *pnt);
 
-  real *b0,(*buf)[0x110];
+  mpgdec_real *b0,(*buf)[0x110];
   int clip = 0; 
   int bo1;
 
@@ -147,11 +147,11 @@
 
   {
     register int j;
-    real *window = mpg123_decwin + 16 - bo1;
+    mpgdec_real *window = mpg123_decwin + 16 - bo1;
 
     for (j=8;j;j--,b0+=0x10,window+=0x30)
     {
-      real sum;
+      mpgdec_real sum;
       sum  = *window++ * *b0++;
       sum -= *window++ * *b0++;
       sum += *window++ * *b0++;
@@ -176,7 +176,7 @@
     }
 
     {
-      real sum;
+      mpgdec_real sum;
       sum  = window[0x0] * b0[0x0];
       sum += window[0x2] * b0[0x2];
       sum += window[0x4] * b0[0x4];
@@ -195,7 +195,7 @@
 
     for (j=7;j;j--,b0-=0x30,window-=0x30)
     {
-      real sum;
+      mpgdec_real sum;
       sum = -*(--window) * *b0++;
       sum -= *(--window) * *b0++;
       sum -= *(--window) * *b0++;
--- a/Plugins/Input/mpg123/decode_4to1.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/decode_4to1.c	Wed Apr 26 10:54:58 2006 -0700
@@ -19,7 +19,7 @@
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
 
-int mpg123_synth_4to1_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpg123_synth_4to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[16];
   short *tmp1 = samples_tmp + channel;
@@ -39,7 +39,7 @@
   return ret;
 }
 
-int mpg123_synth_4to1_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_4to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[16];
   short *tmp1 = samples_tmp;
@@ -59,7 +59,7 @@
 }
 
 
-int mpg123_synth_4to1_8bit_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_4to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[16];
   short *tmp1 = samples_tmp;
@@ -79,7 +79,7 @@
   return ret;
 }
 
-int mpg123_synth_4to1_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_4to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[16];
   short *tmp1 = samples_tmp;
@@ -99,7 +99,7 @@
   return ret;
 }
 
-int mpg123_synth_4to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_4to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
 
@@ -114,14 +114,14 @@
   return ret;
 }
 
-int mpg123_synth_4to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpg123_synth_4to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
-  static real buffs[2][2][0x110];
+  static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
   static int bo = 1;
   short *samples = (short *) (out + *pnt);
 
-  real *b0,(*buf)[0x110];
+  mpgdec_real *b0,(*buf)[0x110];
   int clip = 0; 
   int bo1;
 
@@ -148,11 +148,11 @@
 
   {
     register int j;
-    real *window = mpg123_decwin + 16 - bo1;
+    mpgdec_real *window = mpg123_decwin + 16 - bo1;
 
     for (j=4;j;j--,b0+=0x30,window+=0x70)
     {
-      real sum;
+      mpgdec_real sum;
       sum  = *window++ * *b0++;
       sum -= *window++ * *b0++;
       sum += *window++ * *b0++;
@@ -179,7 +179,7 @@
     }
 
     {
-      real sum;
+      mpgdec_real sum;
       sum  = window[0x0] * b0[0x0];
       sum += window[0x2] * b0[0x2];
       sum += window[0x4] * b0[0x4];
@@ -200,7 +200,7 @@
 
     for (j=3;j;j--,b0-=0x50,window-=0x70)
     {
-      real sum;
+      mpgdec_real sum;
       sum = -*(--window) * *b0++;
       sum -= *(--window) * *b0++;
       sum -= *(--window) * *b0++;
--- a/Plugins/Input/mpg123/decode_ntom.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/decode_ntom.c	Wed Apr 26 10:54:58 2006 -0700
@@ -41,7 +41,7 @@
 	ntom_val[0] = ntom_val[1] = NTOM_MUL>>1;
 }
 
-int mpg123_synth_ntom_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpg123_synth_ntom_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[8*64];
   short *tmp1 = samples_tmp + channel;
@@ -61,7 +61,7 @@
   return ret;
 }
 
-int mpg123_synth_ntom_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_ntom_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[8*64];
   short *tmp1 = samples_tmp;
@@ -80,7 +80,7 @@
   return ret;
 }
 
-int mpg123_synth_ntom_8bit_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_ntom_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[8*64];
   short *tmp1 = samples_tmp;
@@ -100,7 +100,7 @@
   return ret;
 }
 
-int mpg123_synth_ntom_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_ntom_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[8*64];
   short *tmp1 = samples_tmp;
@@ -121,7 +121,7 @@
 }
 
 
-int mpg123_synth_ntom_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_ntom_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
   int pnt1 = *pnt;
@@ -138,14 +138,14 @@
 }
 
 
-int mpg123_synth_ntom(real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpg123_synth_ntom(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
-  static real buffs[2][2][0x110];
+  static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
   static int bo = 1;
   short *samples = (short *) (out + *pnt);
 
-  real *b0,(*buf)[0x110];
+  mpgdec_real *b0,(*buf)[0x110];
   int clip = 0; 
   int bo1;
   int ntom;
@@ -177,11 +177,11 @@
 
   {
     register int j;
-    real *window = decwin + 16 - bo1;
+    mpgdec_real *window = decwin + 16 - bo1;
  
     for (j=16;j;j--,window+=0x10)
     {
-      real sum;
+      mpgdec_real sum;
 
       ntom += ntom_step;
       if(ntom < NTOM_MUL) {
@@ -217,7 +217,7 @@
     ntom += ntom_step;
     if(ntom >= NTOM_MUL)
     {
-      real sum;
+      mpgdec_real sum;
       sum  = window[0x0] * b0[0x0];
       sum += window[0x2] * b0[0x2];
       sum += window[0x4] * b0[0x4];
@@ -239,7 +239,7 @@
 
     for (j=15;j;j--,b0-=0x20,window-=0x10)
     {
-      real sum;
+      mpgdec_real sum;
 
       ntom += ntom_step;
       if(ntom < NTOM_MUL) {
--- a/Plugins/Input/mpg123/layer1.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/layer1.c	Wed Apr 26 10:54:58 2006 -0700
@@ -52,7 +52,7 @@
   }
 }
 
-void I_step_two(real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT],
+void I_step_two(mpgdec_real fraction[2][SBLIMIT],unsigned int balloc[2*SBLIMIT],
 	unsigned int scale_index[2][SBLIMIT],struct frame *fr)
 {
   int i,n;
@@ -63,8 +63,8 @@
 
   if(fr->stereo) {
     int jsbound = fr->jsbound;
-    register real *f0 = fraction[0];
-    register real *f1 = fraction[1];
+    register mpgdec_real *f0 = fraction[0];
+    register mpgdec_real *f1 = fraction[1];
     ba = balloc;
     for (sample=smpb,i=0;i<jsbound;i++)  {
       if ((n = *ba++))
@@ -79,17 +79,17 @@
     ba = balloc;
     for (sample=smpb,i=0;i<jsbound;i++) {
       if((n=*ba++))
-        *f0++ = (real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
+        *f0++ = (mpgdec_real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
       else
         *f0++ = 0.0;
       if((n=*ba++))
-        *f1++ = (real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
+        *f1++ = (mpgdec_real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
       else
         *f1++ = 0.0;
     }
     for (i=jsbound;i<SBLIMIT;i++) {
       if ((n=*ba++)) {
-        real samp = ( ((-1)<<n) + (*sample++) + 1);
+        mpgdec_real samp = ( ((-1)<<n) + (*sample++) + 1);
         *f0++ = samp * mpg123_muls[n+1][*sca++];
         *f1++ = samp * mpg123_muls[n+1][*sca++];
       }
@@ -100,7 +100,7 @@
       fraction[0][i] = fraction[1][i] = 0.0;
   }
   else {
-    register real *f0 = fraction[0];
+    register mpgdec_real *f0 = fraction[0];
     ba = balloc;
     for (sample=smpb,i=0;i<SBLIMIT;i++)
       if ((n = *ba++))
@@ -108,7 +108,7 @@
     ba = balloc;
     for (sample=smpb,i=0;i<SBLIMIT;i++) {
       if((n=*ba++))
-        *f0++ = (real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
+        *f0++ = (mpgdec_real) ( ((-1)<<n) + (*sample++) + 1) * mpg123_muls[n+1][*sca++];
       else
         *f0++ = 0.0;
     }
@@ -123,7 +123,7 @@
     int i, stereo = fr->stereo;
     unsigned int balloc[2 * SBLIMIT];
     unsigned int scale_index[2][SBLIMIT];
-    real fraction[2][SBLIMIT];
+    mpgdec_real fraction[2][SBLIMIT];
     int single = fr->single;
 
     fr->jsbound =
@@ -138,14 +138,14 @@
         I_step_two(fraction, balloc, scale_index, fr);
 
         if (single >= 0) {
-            (fr->synth_mono) ((real *) fraction[single], mpg123_pcm_sample,
+            (fr->synth_mono) ((mpgdec_real *) fraction[single], mpg123_pcm_sample,
                               &mpg123_pcm_point);
         }
         else {
             int p1 = mpg123_pcm_point;
 
-            (fr->synth) ((real *) fraction[0], 0, mpg123_pcm_sample, &p1);
-            (fr->synth) ((real *) fraction[1], 1, mpg123_pcm_sample,
+            (fr->synth) ((mpgdec_real *) fraction[0], 0, mpg123_pcm_sample, &p1);
+            (fr->synth) ((mpgdec_real *) fraction[1], 1, mpg123_pcm_sample,
                          &mpg123_pcm_point);
         }
         if (mpg123_info->output_audio && mpg123_info->jump_to_time == -1) {
--- a/Plugins/Input/mpg123/layer2.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/layer2.c	Wed Apr 26 10:54:58 2006 -0700
@@ -16,7 +16,7 @@
 static int grp_5tab[128 * 3] = { 0, };	/* used: 125 */
 static int grp_9tab[1024 * 3] = { 0, };	/* used: 729 */
 
-real mpg123_muls[27][64];	/* also used by layer 1 */
+mpgdec_real mpg123_muls[27][64];	/* also used by layer 1 */
 
 void
 mpg123_init_layer2 (gboolean mmx)
@@ -35,7 +35,7 @@
     {21, 1, 22, 23, 0, 24, 25, 2, 26}
   };
   int i, j, k, l, len;
-  real *table;
+  mpgdec_real *table;
   static int tablen[3] = { 3, 5, 9 };
   static int *itable, *tables[3] = { grp_3tab, grp_5tab, grp_9tab };
 
@@ -139,7 +139,7 @@
 }
 
 void
-II_step_two (unsigned int *bit_alloc, real fraction[2][4][SBLIMIT],
+II_step_two (unsigned int *bit_alloc, mpgdec_real fraction[2][4][SBLIMIT],
 	     int *scale, struct frame *fr, int x1)
 {
   int i, j, k, ba;
@@ -160,14 +160,14 @@
 	      k = (alloc2 = alloc1 + ba)->bits;
 	      if ((d1 = alloc2->d) < 0)
 		{
-		  real cm = mpg123_muls[k][scale[x1]];
+		  mpgdec_real cm = mpg123_muls[k][scale[x1]];
 
 		  fraction[j][0][i] =
-		    ((real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
+		    ((mpgdec_real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
 		  fraction[j][1][i] =
-		    ((real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
+		    ((mpgdec_real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
 		  fraction[j][2][i] =
-		    ((real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
+		    ((mpgdec_real) ((int) mpg123_getbits (&bsi, k) + d1)) * cm;
 		}
 	      else
 		{
@@ -197,17 +197,17 @@
 	  k = (alloc2 = alloc1 + ba)->bits;
 	  if ((d1 = alloc2->d) < 0)
 	    {
-	      real cm;
+	      mpgdec_real cm;
 
 	      cm = mpg123_muls[k][scale[x1 + 3]];
 	      fraction[1][0][i] = (fraction[0][0][i] =
-				   (real) ((int) mpg123_getbits (&bsi, k) +
+				   (mpgdec_real) ((int) mpg123_getbits (&bsi, k) +
 					   d1)) * cm;
 	      fraction[1][1][i] = (fraction[0][1][i] =
-				   (real) ((int) mpg123_getbits (&bsi, k) +
+				   (mpgdec_real) ((int) mpg123_getbits (&bsi, k) +
 					   d1)) * cm;
 	      fraction[1][2][i] = (fraction[0][2][i] =
-				   (real) ((int) mpg123_getbits (&bsi, k) +
+				   (mpgdec_real) ((int) mpg123_getbits (&bsi, k) +
 					   d1)) * cm;
 	      cm = mpg123_muls[k][scale[x1]];
 	      fraction[0][0][i] *= cm;
@@ -291,7 +291,7 @@
 {
   int i, j;
   int stereo = fr->stereo;
-  real fraction[2][4][SBLIMIT];	/* pick_table clears unused subbands */
+  mpgdec_real fraction[2][4][SBLIMIT];	/* pick_table clears unused subbands */
   unsigned int bit_alloc[64];
   int scale[192];
   int single = fr->single;
--- a/Plugins/Input/mpg123/layer3.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/layer3.c	Wed Apr 26 10:54:58 2006 -0700
@@ -28,22 +28,22 @@
 
 #include "getbits.h"
 
-static real ispow[8207];
-static real aa_ca[8],aa_cs[8];
-static real COS1[12][6];
-static real win[4][36];
-static real win1[4][36];
-static real gainpow2[256+118+4];
+static mpgdec_real ispow[8207];
+static mpgdec_real aa_ca[8],aa_cs[8];
+static mpgdec_real COS1[12][6];
+static mpgdec_real win[4][36];
+static mpgdec_real win1[4][36];
+static mpgdec_real gainpow2[256+118+4];
 
 /* non static for external 3dnow functions */
-real   COS9[9];
-static real COS6_1,COS6_2;
-real   tfcos36[9];
+mpgdec_real   COS9[9];
+static mpgdec_real COS6_1,COS6_2;
+mpgdec_real   tfcos36[9];
 
-static real tfcos12[3];
+static mpgdec_real tfcos12[3];
 #define NEW_DCT9
 #ifdef NEW_DCT9
-static real cos9[3],cos18[3];
+static mpgdec_real cos9[3],cos18[3];
 #endif
 
 struct bandInfoStruct {
@@ -117,8 +117,8 @@
 static unsigned int n_slen2[512]; /* MPEG 2.0 slen for 'normal' mode */
 static unsigned int i_slen2[256]; /* MPEG 2.0 slen for intensity stereo */
 
-static real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16];
-static real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16];
+static mpgdec_real tan1_1[16],tan2_1[16],tan1_2[16],tan2_2[16];
+static mpgdec_real pow1_1[2][16],pow2_1[2][16],pow1_2[2][16],pow2_2[2][16];
 
 void
 mpg123_init_layer3(int down_sample_sblimit)
@@ -609,11 +609,11 @@
     num += 8; \
     part2remain -= 8; }
 
-static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
+static int III_dequantize_sample(mpgdec_real xr[SBLIMIT][SSLIMIT],int *scf,
    struct gr_info_s *gr_info,int sfreq,int part2bits)
 {
   int shift = 1 + gr_info->scalefac_scale;
-  real *xrpnt = (real *) xr;
+  mpgdec_real *xrpnt = (mpgdec_real *) xr;
   int l[3],l3;
   int part2remain = gr_info->part2_3_length - part2bits;
   int *me;
@@ -655,7 +655,7 @@
      */
     int i,max[4];
     int step=0,lwin=3,cb=0;
-    register real v = 0.0;
+    register mpgdec_real v = 0.0;
     register int *m,mc;
 
     if(gr_info->mixed_block_flag) {
@@ -679,7 +679,7 @@
         register int x,y;
         if( (!mc) ) {
           mc    = *m++;
-          xrpnt = ((real *) xr) + (*m++);
+          xrpnt = ((mpgdec_real *) xr) + (*m++);
           lwin  = *m++;
           cb    = *m++;
           if(lwin == 3) {
@@ -774,7 +774,7 @@
         if(!(i & 1)) {
           if(!mc) {
             mc = *m++;
-            xrpnt = ((real *) xr) + (*m++);
+            xrpnt = ((mpgdec_real *) xr) + (*m++);
             lwin = *m++;
             cb = *m++;
             if(lwin == 3) {
@@ -815,7 +815,7 @@
         if(m >= me)
           break;
         mc    = *m++;
-        xrpnt = ((real *) xr) + *m++;
+        xrpnt = ((mpgdec_real *) xr) + *m++;
         if(*m++ == 0)
           break; /* optimize: field will be set to zero at the end of the function */
         m++; /* cb */
@@ -842,7 +842,7 @@
     int i,max = -1;
     int cb = 0;
     int *m = map[sfreq][2];
-    register real v = 0.0;
+    register mpgdec_real v = 0.0;
     int mc = 0;
 
     /*
@@ -1009,18 +1009,18 @@
 }
 
 /* 
- * III_stereo: calculate real channel values for Joint-I-Stereo-mode
+ * III_stereo: calculate mpgdec_real channel values for Joint-I-Stereo-mode
  */
-static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
+static void III_i_stereo(mpgdec_real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
    struct gr_info_s *gr_info,int sfreq,int ms_stereo,int lsf)
 {
-      real (*xr)[SBLIMIT*SSLIMIT] = (real (*)[SBLIMIT*SSLIMIT] ) xr_buf;
+      mpgdec_real (*xr)[SBLIMIT*SSLIMIT] = (mpgdec_real (*)[SBLIMIT*SSLIMIT] ) xr_buf;
       struct bandInfoStruct *bi = &bandInfo[sfreq];
 
-      const real *tab1,*tab2;
+      const mpgdec_real *tab1,*tab2;
 
       int tab;
-      static const real *tabs[3][2][2] = { 
+      static const mpgdec_real *tabs[3][2][2] = { 
          { { tan1_1,tan2_1 }     , { tan1_2,tan2_2 } },
          { { pow1_1[0],pow2_1[0] } , { pow1_2[0],pow2_2[0] } } ,
          { { pow1_1[1],pow2_1[1] } , { pow1_2[1],pow2_2[1] } } 
@@ -1063,12 +1063,12 @@
            for(;sfb<12;sfb++) {
              is_p = scalefac[sfb*3+lwin-gr_info->mixed_block_flag]; /* scale: 0-15 */ 
              if(is_p != 7) {
-               real t1,t2;
+               mpgdec_real t1,t2;
                sb  = bi->shortDiff[sfb];
                idx = bi->shortIdx[sfb] + lwin;
                t1  = tab1[is_p]; t2 = tab2[is_p];
                for (; sb > 0; sb--,idx+=3) {
-                 real v = xr[0][idx];
+                 mpgdec_real v = xr[0][idx];
                  xr[0][idx] = REAL_MUL(v, t1);
                  xr[1][idx] = REAL_MUL(v, t2);
                }
@@ -1080,10 +1080,10 @@
            idx  = bi->shortIdx[13] + lwin;
 
            if(is_p != 7) {
-             real t1,t2;
+             mpgdec_real t1,t2;
              t1 = tab1[is_p]; t2 = tab2[is_p];
              for ( ; sb > 0; sb--,idx+=3 ) {  
-               real v = xr[0][idx];
+               mpgdec_real v = xr[0][idx];
                xr[0][idx] = REAL_MUL(v, t1);
                xr[1][idx] = REAL_MUL(v, t2);
              }
@@ -1101,10 +1101,10 @@
              int sb = bi->longDiff[sfb];
              int is_p = scalefac[sfb]; /* scale: 0-15 */
              if(is_p != 7) {
-               real t1,t2;
+               mpgdec_real t1,t2;
                t1 = tab1[is_p]; t2 = tab2[is_p];
                for ( ; sb > 0; sb--,idx++) {
-                 real v = xr[0][idx];
+                 mpgdec_real v = xr[0][idx];
                  xr[0][idx] = REAL_MUL(v, t1);
                  xr[1][idx] = REAL_MUL(v, t2);
                }
@@ -1124,10 +1124,10 @@
           int sb = bi->longDiff[sfb];
           is_p = scalefac[sfb]; /* scale: 0-15 */
           if(is_p != 7) {
-            real t1,t2;
+            mpgdec_real t1,t2;
             t1 = tab1[is_p]; t2 = tab2[is_p];
             for ( ; sb > 0; sb--,idx++) {
-               real v = xr[0][idx];
+               mpgdec_real v = xr[0][idx];
                xr[0][idx] = REAL_MUL(v, t1);
                xr[1][idx] = REAL_MUL(v, t2);
             }
@@ -1139,10 +1139,10 @@
         is_p = scalefac[20];
         if(is_p != 7) {  /* copy l-band 20 to l-band 21 */
           int sb;
-          real t1 = tab1[is_p],t2 = tab2[is_p]; 
+          mpgdec_real t1 = tab1[is_p],t2 = tab2[is_p]; 
 
           for ( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) {
-            real v = xr[0][idx];
+            mpgdec_real v = xr[0][idx];
             xr[0][idx] = REAL_MUL(v, t1);
             xr[1][idx] = REAL_MUL(v, t2);
           }
@@ -1151,7 +1151,7 @@
       } /* ... */
 }
 
-static void III_antialias(real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) {
+static void III_antialias(mpgdec_real xr[SBLIMIT][SSLIMIT],struct gr_info_s *gr_info) {
    int sblim;
 
    if(gr_info->block_type == 2) {
@@ -1168,16 +1168,16 @@
 
    {
      int sb;
-     real *xr1=(real *) xr[1];
+     mpgdec_real *xr1=(mpgdec_real *) xr[1];
 
      for(sb=sblim;sb;sb--,xr1+=10) {
        int ss;
-       real *cs=aa_cs,*ca=aa_ca;
-       real *xr2 = xr1;
+       mpgdec_real *cs=aa_cs,*ca=aa_ca;
+       mpgdec_real *xr2 = xr1;
 
        for(ss=7;ss>=0;ss--)
        {       /* upper and lower butterfly inputs */
-         register real bu = *--xr2,bd = *xr1;
+         register mpgdec_real bu = *--xr2,bd = *xr1;
 	 *xr2   = REAL_MUL(bu, *cs) - REAL_MUL(bd, *ca);
 	 *xr1++ = REAL_MUL(bd, *cs++) + REAL_MUL(bu, *ca++);
        }
@@ -1226,14 +1226,14 @@
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
-void dct36(real *inbuf,real *o1,real *o2,real *wintab,real *tsbuf)
+void dct36(mpgdec_real *inbuf,mpgdec_real *o1,mpgdec_real *o2,mpgdec_real *wintab,mpgdec_real *tsbuf)
 {
 #ifdef NEW_DCT9
-  real tmp[18];
+  mpgdec_real tmp[18];
 #endif
 
   {
-    register real *in = inbuf;
+    register mpgdec_real *in = inbuf;
 
     in[17]+=in[16]; in[16]+=in[15]; in[15]+=in[14];
     in[14]+=in[13]; in[13]+=in[12]; in[12]+=in[11];
@@ -1249,9 +1249,9 @@
 #ifdef NEW_DCT9
 #if 1
     {
-     real t3;
+     mpgdec_real t3;
      { 
-      real t0, t1, t2;
+      mpgdec_real t0, t1, t2;
 
       t0 = REAL_MUL(COS6_2, (in[8] + in[16] - in[4]));
       t1 = REAL_MUL(COS6_2, in[12]);
@@ -1267,7 +1267,7 @@
       tmp[7] += t2;
      }
      {
-      real t0, t1, t2;
+      mpgdec_real t0, t1, t2;
 
       t0 = REAL_MUL(cos9[0], (in[4] + in[8] ));
       t1 = REAL_MUL(cos9[1], (in[8] - in[16]));
@@ -1279,14 +1279,14 @@
      }
     }
     {
-      real t1, t2, t3;
+      mpgdec_real t1, t2, t3;
 
       t1 = REAL_MUL(cos18[0], (in[2]  + in[10]));
       t2 = REAL_MUL(cos18[1], (in[10] - in[14]));
       t3 = REAL_MUL(COS6_1,    in[6]);
 
       {
-        real t0 = t1 + t2 + t3;
+        mpgdec_real t0 = t1 + t2 + t3;
         tmp[0] += t0;
         tmp[8] -= t0;
       }
@@ -1307,7 +1307,7 @@
 
 #else
     {
-      real t0, t1, t2, t3, t4, t5, t6, t7;
+      mpgdec_real t0, t1, t2, t3, t4, t5, t6, t7;
 
       t1 = REAL_MUL(COS6_2, in[12]);
       t2 = REAL_MUL(COS6_2, (in[8] + in[16] - in[4]));
@@ -1350,7 +1350,7 @@
 #endif
 
     {
-      real t0, t1, t2, t3, t4, t5, t6, t7;
+      mpgdec_real t0, t1, t2, t3, t4, t5, t6, t7;
 
       t1 = REAL_MUL(COS6_2, in[13]);
       t2 = REAL_MUL(COS6_2, (in[9] + in[17] - in[5]));
@@ -1392,7 +1392,7 @@
    }
 
 #define MACRO(v) { \
-    real tmpval; \
+    mpgdec_real tmpval; \
     tmpval = tmp[(v)] + tmp[17-(v)]; \
     out2[9+(v)] = REAL_MUL(tmpval, w[27+(v)]); \
     out2[8-(v)] = REAL_MUL(tmpval, w[26-(v)]); \
@@ -1401,10 +1401,10 @@
     ts[SBLIMIT*(9+(v))] = out1[9+(v)] + REAL_MUL(tmpval, w[9+(v)]); }
 
 {
-   register real *out2 = o2;
-   register real *w = wintab;
-   register real *out1 = o1;
-   register real *ts = tsbuf;
+   register mpgdec_real *out2 = o2;
+   register mpgdec_real *w = wintab;
+   register mpgdec_real *out1 = o1;
+   register mpgdec_real *ts = tsbuf;
 
    MACRO(0);
    MACRO(1);
@@ -1422,30 +1422,30 @@
   {
 
 #define MACRO0(v) { \
-    real tmp; \
+    mpgdec_real tmp; \
     out2[9+(v)] = REAL_MUL((tmp = sum0 + sum1), w[27+(v)]); \
     out2[8-(v)] = REAL_MUL(tmp, w[26-(v)]);   } \
     sum0 -= sum1; \
     ts[SBLIMIT*(8-(v))] = out1[8-(v)] + REAL_MUL(sum0, w[8-(v)]); \
     ts[SBLIMIT*(9+(v))] = out1[9+(v)] + REAL_MUL(sum0, w[9+(v)]);
 #define MACRO1(v) { \
-	real sum0,sum1; \
+	mpgdec_real sum0,sum1; \
     sum0 = tmp1a + tmp2a; \
 	sum1 = REAL_MUL((tmp1b + tmp2b), tfcos36[(v)]); \
 	MACRO0(v); }
 #define MACRO2(v) { \
-    real sum0,sum1; \
+    mpgdec_real sum0,sum1; \
     sum0 = tmp2a - tmp1a; \
     sum1 = REAL_MUL((tmp2b - tmp1b), tfcos36[(v)]); \
 	MACRO0(v); }
 
-    register const real *c = COS9;
-    register real *out2 = o2;
-	register real *w = wintab;
-	register real *out1 = o1;
-	register real *ts = tsbuf;
+    register const mpgdec_real *c = COS9;
+    register mpgdec_real *out2 = o2;
+	register mpgdec_real *w = wintab;
+	register mpgdec_real *out1 = o1;
+	register mpgdec_real *ts = tsbuf;
 
-    real ta33,ta66,tb33,tb66;
+    mpgdec_real ta33,ta66,tb33,tb66;
 
     ta33 = REAL_MUL(in[2*3+0], c[3]);
     ta66 = REAL_MUL(in[2*6+0], c[6]);
@@ -1453,7 +1453,7 @@
     tb66 = REAL_MUL(in[2*6+1], c[6]);
 
     { 
-      real tmp1a,tmp2a,tmp1b,tmp2b;
+      mpgdec_real tmp1a,tmp2a,tmp1b,tmp2b;
       tmp1a = REAL_MUL(in[2*1+0], c[1]) + ta33 + REAL_MUL(in[2*5+0], c[5]) + REAL_MUL(in[2*7+0], c[7]);
       tmp1b = REAL_MUL(in[2*1+1], c[1]) + tb33 + REAL_MUL(in[2*5+1], c[5]) + REAL_MUL(in[2*7+1], c[7]);
       tmp2a = REAL_MUL(in[2*2+0], c[2]) + REAL_MUL(in[2*4+0], c[4]) + ta66 + REAL_MUL(in[2*8+0], c[8]);
@@ -1464,7 +1464,7 @@
     }
 
     {
-      real tmp1a,tmp2a,tmp1b,tmp2b;
+      mpgdec_real tmp1a,tmp2a,tmp1b,tmp2b;
       tmp1a = REAL_MUL(( in[2*1+0] - in[2*5+0] - in[2*7+0] ), c[3]);
       tmp1b = REAL_MUL(( in[2*1+1] - in[2*5+1] - in[2*7+1] ), c[3]);
       tmp2a = REAL_MUL(( in[2*2+0] - in[2*4+0] - in[2*8+0] ), c[6]) - in[2*6+0] + in[2*0+0];
@@ -1475,7 +1475,7 @@
     }
 
     {
-      real tmp1a,tmp2a,tmp1b,tmp2b;
+      mpgdec_real tmp1a,tmp2a,tmp1b,tmp2b;
       tmp1a =   REAL_MUL(in[2*1+0], c[5]) - ta33 - REAL_MUL(in[2*5+0], c[7]) + REAL_MUL(in[2*7+0], c[1]);
       tmp1b =   REAL_MUL(in[2*1+1], c[5]) - tb33 - REAL_MUL(in[2*5+1], c[7]) + REAL_MUL(in[2*7+1], c[1]);
       tmp2a = - REAL_MUL(in[2*2+0], c[8]) - REAL_MUL(in[2*4+0], c[2]) + ta66 + REAL_MUL(in[2*8+0], c[4]);
@@ -1486,7 +1486,7 @@
     }
 
     {
-      real tmp1a,tmp2a,tmp1b,tmp2b;
+      mpgdec_real tmp1a,tmp2a,tmp1b,tmp2b;
       tmp1a =   REAL_MUL(in[2*1+0], c[7]) - ta33 + REAL_MUL(in[2*5+0], c[1]) - REAL_MUL(in[2*7+0], c[5]);
       tmp1b =   REAL_MUL(in[2*1+1], c[7]) - tb33 + REAL_MUL(in[2*5+1], c[1]) - REAL_MUL(in[2*7+1], c[5]);
       tmp2a = - REAL_MUL(in[2*2+0], c[4]) + REAL_MUL(in[2*4+0], c[8]) + ta66 - REAL_MUL(in[2*8+0], c[2]);
@@ -1497,7 +1497,7 @@
     }
 
 	{
-		real sum0,sum1;
+		mpgdec_real sum0,sum1;
     	sum0 =  in[2*0+0] - in[2*2+0] + in[2*4+0] - in[2*6+0] + in[2*8+0];
     	sum1 = REAL_MUL((in[2*0+1] - in[2*2+1] + in[2*4+1] - in[2*6+1] + in[2*8+1] ), tfcos36[4]);
 		MACRO0(4);
@@ -1511,7 +1511,7 @@
 /*
  * new DCT12
  */
-static void dct12(real *in,real *rawout1,real *rawout2,register real *wi,register real *ts)
+static void dct12(mpgdec_real *in,mpgdec_real *rawout1,mpgdec_real *rawout2,register mpgdec_real *wi,register mpgdec_real *ts)
 {
 #define DCT12_PART1 \
              in5 = in[5*3];  \
@@ -1545,17 +1545,17 @@
 
 
    {
-     real in0,in1,in2,in3,in4,in5;
-     register real *out1 = rawout1;
+     mpgdec_real in0,in1,in2,in3,in4,in5;
+     register mpgdec_real *out1 = rawout1;
      ts[SBLIMIT*0] = out1[0]; ts[SBLIMIT*1] = out1[1]; ts[SBLIMIT*2] = out1[2];
      ts[SBLIMIT*3] = out1[3]; ts[SBLIMIT*4] = out1[4]; ts[SBLIMIT*5] = out1[5];
  
      DCT12_PART1
 
      {
-       real tmp0,tmp1 = (in0 - in4);
+       mpgdec_real tmp0,tmp1 = (in0 - in4);
        {
-         real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
+         mpgdec_real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
          tmp0 = tmp1 + tmp2;
          tmp1 -= tmp2;
        }
@@ -1581,15 +1581,15 @@
   in++;
 
   {
-     real in0,in1,in2,in3,in4,in5;
-     register real *out2 = rawout2;
+     mpgdec_real in0,in1,in2,in3,in4,in5;
+     register mpgdec_real *out2 = rawout2;
  
      DCT12_PART1
 
      {
-       real tmp0,tmp1 = (in0 - in4);
+       mpgdec_real tmp0,tmp1 = (in0 - in4);
        {
-         real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
+         mpgdec_real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
          tmp0 = tmp1 + tmp2;
          tmp1 -= tmp2;
        }
@@ -1615,16 +1615,16 @@
   in++; 
 
   {
-     real in0,in1,in2,in3,in4,in5;
-     register real *out2 = rawout2;
+     mpgdec_real in0,in1,in2,in3,in4,in5;
+     register mpgdec_real *out2 = rawout2;
      out2[12]=out2[13]=out2[14]=out2[15]=out2[16]=out2[17]=0.0;
 
      DCT12_PART1
 
      {
-       real tmp0,tmp1 = (in0 - in4);
+       mpgdec_real tmp0,tmp1 = (in0 - in4);
        {
-         real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
+         mpgdec_real tmp2 = REAL_MUL((in1 - in5), tfcos12[1]);
          tmp0 = tmp1 + tmp2;
          tmp1 -= tmp2;
        }
@@ -1652,15 +1652,15 @@
  * III_hybrid
  */
 static void
-III_hybrid(real fsIn[SBLIMIT][SSLIMIT],
-           real tsOut[SSLIMIT][SBLIMIT], int ch,
+III_hybrid(mpgdec_real fsIn[SBLIMIT][SSLIMIT],
+           mpgdec_real tsOut[SSLIMIT][SBLIMIT], int ch,
            struct gr_info_s *gr_info, struct frame *fr)
 {
-    static real block[2][2][SBLIMIT * SSLIMIT] = { {{0,}} };
+    static mpgdec_real block[2][2][SBLIMIT * SSLIMIT] = { {{0,}} };
     static int blc[2] = { 0, 0 };
 
-    real *tspnt = (real *) tsOut;
-    real *rawout1, *rawout2;
+    mpgdec_real *tspnt = (mpgdec_real *) tsOut;
+    mpgdec_real *rawout1, *rawout2;
     int bt, sb = 0;
 
     {
@@ -1742,8 +1742,8 @@
     mpg123_set_pointer(sideinfo.main_data_begin);
 
     for (gr = 0; gr < granules; gr++) {
-        real hybridIn[2][SBLIMIT][SSLIMIT];
-        real hybridOut[2][SSLIMIT][SBLIMIT];
+        mpgdec_real hybridIn[2][SBLIMIT][SSLIMIT];
+        mpgdec_real hybridOut[2][SSLIMIT][SBLIMIT];
 
         {
             struct gr_info_s *gr_info = &(sideinfo.ch[0].gr[gr]);
@@ -1779,10 +1779,10 @@
                 if (sideinfo.ch[1].gr[gr].maxb > maxb)
                     maxb = sideinfo.ch[1].gr[gr].maxb;
                 for (i = 0; i < SSLIMIT * maxb; i++) {
-                    real tmp0 = ((real *) hybridIn[0])[i];
-                    real tmp1 = ((real *) hybridIn[1])[i];
-                    ((real *) hybridIn[0])[i] = tmp0 + tmp1;
-                    ((real *) hybridIn[1])[i] = tmp0 - tmp1;
+                    mpgdec_real tmp0 = ((mpgdec_real *) hybridIn[0])[i];
+                    mpgdec_real tmp1 = ((mpgdec_real *) hybridIn[1])[i];
+                    ((mpgdec_real *) hybridIn[0])[i] = tmp0 + tmp1;
+                    ((mpgdec_real *) hybridIn[1])[i] = tmp0 - tmp1;
                 }
             }
 
@@ -1801,8 +1801,8 @@
             case 3:
                 {
                     register unsigned int i;
-                    register real *in0 = (real *) hybridIn[0],
-                        *in1 = (real *) hybridIn[1];
+                    register mpgdec_real *in0 = (mpgdec_real *) hybridIn[0],
+                        *in1 = (mpgdec_real *) hybridIn[1];
                     for (i = 0; i < SSLIMIT * gr_info->maxb; i++, in0++)
                         *in0 = (*in0 + *in1++); /* *0.5 done by pow-scale */
                 }
@@ -1810,8 +1810,8 @@
             case 1:
                 {
                     register unsigned int i;
-                    register real *in0 = (real *) hybridIn[0],
-                        *in1 = (real *) hybridIn[1];
+                    register mpgdec_real *in0 = (mpgdec_real *) hybridIn[0],
+                        *in1 = (mpgdec_real *) hybridIn[1];
                     for (i = 0; i < SSLIMIT * gr_info->maxb; i++)
                         *in0++ = *in1++;
                 }
--- a/Plugins/Input/mpg123/mpg123.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/mpg123.c	Wed Apr 26 10:54:58 2006 -0700
@@ -109,9 +109,9 @@
 static void
 set_synth_functions(struct frame *fr)
 {
-    typedef int (*func) (real *, int, unsigned char *, int *);
-    typedef int (*func_mono) (real *, unsigned char *, int *);
-    typedef void (*func_dct36) (real *, real *, real *, real *, real *);
+    typedef int (*func) (mpgdec_real *, int, unsigned char *, int *);
+    typedef int (*func_mono) (mpgdec_real *, unsigned char *, int *);
+    typedef void (*func_dct36) (mpgdec_real *, mpgdec_real *, mpgdec_real *, mpgdec_real *, mpgdec_real *);
 
     int ds = fr->down_sample;
     int p8 = 0;
--- a/Plugins/Input/mpg123/mpg123.h	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/mpg123.h	Wed Apr 26 10:54:58 2006 -0700
@@ -13,6 +13,16 @@
 #include <glib.h>
 #include <tag_c.h>
 
+#ifdef INTEGER_COMPILE
+
+typedef int mpgdec_real;
+
+#else
+
+typedef float mpgdec_real;
+
+#endif
+
 enum {
     SYNTH_AUTO,
     SYNTH_FPU,
@@ -32,7 +42,7 @@
 #include "dxhead.h"
 #include "xmms-id3.h"
 
-#define real float
+#define mpgdec_real float
 
 #define         SBLIMIT                 32
 #define         SCALE_BLOCK             12
@@ -108,8 +118,8 @@
 
 struct frame {
     struct al_table *alloc;
-    int (*synth) (real *, int, unsigned char *, int *);
-    int (*synth_mono) (real *, unsigned char *, int *);
+    int (*synth) (mpgdec_real *, int, unsigned char *, int *);
+    int (*synth_mono) (mpgdec_real *, unsigned char *, int *);
     int stereo;
     int jsbound;
     int single;
@@ -175,11 +185,11 @@
   struct frame fr;
  /* int (*do_layer)(struct mpstr *,struct frame *fr,int,struct audio_info_struct *); */
   unsigned char bsspace[2][MAXFRAMESIZE+512]; /* MAXFRAMESIZE */
-  real hybrid_block[2][2][SBLIMIT*SSLIMIT];
+  mpgdec_real hybrid_block[2][2][SBLIMIT*SSLIMIT];
   int  hybrid_blc[2];
   unsigned long header;
   int bsnum;
-  real synth_buffs[2][2][0x110];
+  mpgdec_real synth_buffs[2][2][0x110];
   int  synth_bo;
 
   struct bitstream_info bsi;
@@ -228,8 +238,8 @@
     unsigned preflag;
     unsigned scalefac_scale;
     unsigned count1table_select;
-    real *full_gain[3];
-    real *pow2gain;
+    mpgdec_real *full_gain[3];
+    mpgdec_real *pow2gain;
 };
 
 struct III_sideinfo {
@@ -255,28 +265,28 @@
 extern int mpg123_do_layer2(struct frame *fr);
 extern int mpg123_do_layer1(struct frame *fr);
 
-extern int mpg123_synth_1to1(real *, int, unsigned char *, int *);
-extern int mpg123_synth_1to1_8bit(real *, int, unsigned char *, int *);
-extern int mpg123_synth_1to1_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_1to1_mono2stereo(real *, unsigned char *, int *);
-extern int mpg123_synth_1to1_8bit_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_1to1_8bit_mono2stereo(real *, unsigned char *,
+extern int mpg123_synth_1to1(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_1to1_8bit(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_1to1_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_1to1_mono2stereo(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_1to1_8bit_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_1to1_8bit_mono2stereo(mpgdec_real *, unsigned char *,
                                               int *);
 
-extern int mpg123_synth_2to1(real *, int, unsigned char *, int *);
-extern int mpg123_synth_2to1_8bit(real *, int, unsigned char *, int *);
-extern int mpg123_synth_2to1_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_2to1_mono2stereo(real *, unsigned char *, int *);
-extern int mpg123_synth_2to1_8bit_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_2to1_8bit_mono2stereo(real *, unsigned char *,
+extern int mpg123_synth_2to1(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_2to1_8bit(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_2to1_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_2to1_mono2stereo(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_2to1_8bit_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_2to1_8bit_mono2stereo(mpgdec_real *, unsigned char *,
                                               int *);
 
-extern int mpg123_synth_4to1(real *, int, unsigned char *, int *);
-extern int mpg123_synth_4to1_8bit(real *, int, unsigned char *, int *);
-extern int mpg123_synth_4to1_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_4to1_mono2stereo(real *, unsigned char *, int *);
-extern int mpg123_synth_4to1_8bit_mono(real *, unsigned char *, int *);
-extern int mpg123_synth_4to1_8bit_mono2stereo(real *, unsigned char *,
+extern int mpg123_synth_4to1(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_4to1_8bit(mpgdec_real *, int, unsigned char *, int *);
+extern int mpg123_synth_4to1_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_4to1_mono2stereo(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_4to1_8bit_mono(mpgdec_real *, unsigned char *, int *);
+extern int mpg123_synth_4to1_8bit_mono2stereo(mpgdec_real *, unsigned char *,
                                               int *);
 
 extern void mpg123_rewindNbits(int bits);
@@ -296,7 +306,7 @@
 void mpg123_init_layer2(gboolean);
 void mpg123_make_decode_tables(long scaleval);
 void mpg123_make_conv16to8_table(void);
-void mpg123_dct64(real *, real *, real *);
+void mpg123_dct64(mpgdec_real *, mpgdec_real *, mpgdec_real *);
 
 int mpg123_decode_header(struct frame *fr, unsigned long newhead);
 double mpg123_compute_bpf(struct frame *fr);
@@ -309,9 +319,9 @@
 extern gchar ** mpg123_id3_encoding_list;
 extern unsigned char *mpg123_conv16to8;
 extern const int mpg123_freqs[9];
-extern real mpg123_muls[27][64];
-extern real mpg123_decwin[512 + 32];
-extern real *mpg123_pnts[5];
+extern mpgdec_real mpg123_muls[27][64];
+extern mpgdec_real mpg123_decwin[512 + 32];
+extern mpgdec_real *mpg123_pnts[5];
 
 #define GENRE_MAX 0x94
 extern const char *mpg123_id3_genres[GENRE_MAX];
--- a/Plugins/Input/mpg123/tabinit.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/tabinit.c	Wed Apr 26 10:54:58 2006 -0700
@@ -4,9 +4,9 @@
 
 #include "mpg123.h"
 
-real mpg123_decwin[512 + 32];
-static real cos64[16], cos32[8], cos16[4], cos8[2], cos4[1];
-real *mpg123_pnts[] = { cos64, cos32, cos16, cos8, cos4 };
+mpgdec_real mpg123_decwin[512 + 32];
+static mpgdec_real cos64[16], cos32[8], cos16[4], cos8[2], cos4[1];
+mpgdec_real *mpg123_pnts[] = { cos64, cos32, cos16, cos8, cos4 };
 
 static unsigned char *mpg123_conv16to8_buf = NULL;
 unsigned char *mpg123_conv16to8;
@@ -47,7 +47,7 @@
 mpg123_make_decode_tables_fpu(long scaleval)
 {
     int i, j;
-    real *table, *costab;
+    mpgdec_real *table, *costab;
 
     for (i = 0; i < 5; i++) {
         int kr = 0x10 >> i;