changeset 185:05074252a497 trunk

[svn] Fix a gcc issue, I think.
author nenolod
date Sun, 13 Nov 2005 17:59:06 -0800
parents 740c072f8e23
children 01babf2781bb
files Plugins/Input/mpg123/decode_i386.c
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/decode_i386.c	Sun Nov 13 14:27:07 2005 -0800
+++ b/Plugins/Input/mpg123/decode_i386.c	Sun Nov 13 17:59:06 2005 -0800
@@ -16,23 +16,11 @@
 
 #include "mpg123.h"
 
-#if 0
- /* old WRITE_SAMPLE */
+/* XXX this needs to be not a macro someday. */
 #define WRITE_SAMPLE(samples,sum,clip) \
   if( (sum) > 32767.0) { *(samples) = 0x7fff; (clip)++; } \
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
-#else
- /* new WRITE_SAMPLE */
-#define WRITE_SAMPLE(samples,sum,clip) { \
-  double dtemp; int v; /* sizeof(int) == 4 */ \
-  dtemp = ((((65536.0 * 65536.0 * 16)+(65536.0 * 0.5))* 65536.0)) + (sum);  \
-  v = ((*(int *)&dtemp) - 0x80000000); \
-  if( v > 32767) { *(samples) = 0x7fff; (clip)++; } \
-  else if( v < -32768) { *(samples) = -0x8000; (clip)++; } \
-  else { *(samples) = v; }  \
-}
-#endif
 
 int mpg123_synth_1to1_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {