# HG changeset patch # User nick # Date 1011805798 0 # Node ID 63fb32311b3b3d5b717f618ee5ab49f82d97571f # Parent bfcf2517876b784e261712fa9598eb1bf35432a7 Fixing compilation on non-MMX but x86 systems diff -r bfcf2517876b -r 63fb32311b3b mp3lib/decod386.c --- a/mp3lib/decod386.c Wed Jan 23 17:03:15 2002 +0000 +++ b/mp3lib/decod386.c Wed Jan 23 17:09:58 2002 +0000 @@ -13,6 +13,13 @@ #include "../config.h" +#ifndef CAN_COMPILE_X86 +#ifdef ARCH_X86 +#define CAN_COMPILE_X86 +#endif +#endif + + #if 0 /* old WRITE_SAMPLE */ /* is portable */ @@ -149,7 +156,7 @@ synth_func_t synth_func; -#if (defined(RUNTIME_CPUDETECT) && defined(CAN_COMPILE_X86_ASM)) || defined(HAVE_MMX) +#if defined(CAN_COMPILE_X86_ASM) int synth_1to1_MMX( real *bandPtr,int channel,short * samples) { static short buffs[2][2][0x110]; @@ -169,7 +176,7 @@ int clip = 0; int bo1; /* optimized for x86 */ -#if (defined(RUNTIME_CPUDETECT) && defined(CAN_COMPILE_X86_ASM)) || defined(ARCH_X86) +#if defined(CAN_COMPILE_X86_ASM) if ( synth_func ) { int ret; diff -r bfcf2517876b -r 63fb32311b3b mp3lib/sr1.c --- a/mp3lib/sr1.c Wed Jan 23 17:03:15 2002 +0000 +++ b/mp3lib/sr1.c Wed Jan 23 17:09:58 2002 +0000 @@ -129,7 +129,7 @@ // if(MP3_frames>=7741) printf("getbits_fast: bits=%d bitsleft=%d wordptr=%x\n",number_of_bits,bitsleft,wordpointer); if((bitsleft-=number_of_bits)<0) return 0; if(!number_of_bits) return 0; -#if (defined(RUNTIME_CPUDETECT) && defined(CAN_COMPILE_X86_ASM)) || defined(ARCH_X86) +#if defined(CAN_COMPILE_X86_ASM) rval = bswap_16(*((unsigned short *)wordpointer)); #else /* @@ -172,7 +172,7 @@ LOCAL int stream_head_read(unsigned char *hbuf,unsigned long *newhead){ if(mp3_read(hbuf,4) != 4) return FALSE; -#if (defined(RUNTIME_CPUDETECT) && defined(CAN_COMPILE_X86_ASM)) || defined(ARCH_X86) +#if defined(CAN_COMPILE_X86_ASM) *newhead = bswap_32(*((unsigned long *)hbuf)); #else /*