Mercurial > sdl-ios-xcode
diff src/audio/SDL_mixer.c @ 739:22dbf364c017
Added SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE() in SDL_cpuinfo.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 18 Nov 2003 01:27:06 +0000 |
parents | 873c2598f969 |
children | 72ef7ce609ef |
line wrap: on
line diff
--- a/src/audio/SDL_mixer.c Fri Nov 14 20:21:22 2003 +0000 +++ b/src/audio/SDL_mixer.c Tue Nov 18 01:27:06 2003 +0000 @@ -34,28 +34,13 @@ #include "SDL_audio.h" #include "SDL_mutex.h" #include "SDL_timer.h" +#include "SDL_cpuinfo.h" #include "SDL_sysaudio.h" +#include "SDL_cpuinfo.h" #include "SDL_mixer_MMX.h" #include "SDL_mixer_MMX_VC.h" #include "SDL_mixer_m68k.h" -/* Function to check the CPU flags */ -#define MMX_CPU 0x800000 -#ifdef USE_ASMBLIT -#define CPU_Flags() Hermes_X86_CPU() -#else -#define CPU_Flags() 0L -#endif - -#ifdef USE_ASMBLIT -#define X86_ASSEMBLER -#define HermesConverterInterface void -#define HermesClearInterface void -#define STACKCALL - -#include "HeadX86.h" -#endif - /* This table is used to add two sound values together and pin * the value to avoid overflow. (used with permission from ARDI) * Changed to use 0xFE instead of 0xFF for better sound quality. @@ -154,7 +139,7 @@ case AUDIO_S8: { #if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) - if (CPU_Flags() & MMX_CPU) + if (SDL_HasMMX()) { SDL_MixAudio_MMX_S8((char*)dst,(char*)src,(unsigned int)len,(int)volume); } @@ -201,7 +186,7 @@ case AUDIO_S16LSB: { #if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) - if (CPU_Flags() & MMX_CPU) + if (SDL_HasMMX()) { SDL_MixAudio_MMX_S16((char*)dst,(char*)src,(unsigned int)len,(int)volume); }