diff src/audio/SDL_mixer.c @ 1402:d910939febfa

Use consistent identifiers for the various platforms we support. Make sure every source file includes SDL_config.h, so the proper system headers are chosen.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Feb 2006 08:46:50 +0000
parents c71e05b4dc2e
children e3242177fe4a
line wrap: on
line diff
--- a/src/audio/SDL_mixer.c	Tue Feb 21 08:34:45 2006 +0000
+++ b/src/audio/SDL_mixer.c	Tue Feb 21 08:46:50 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /* This provides the default mixing callback for the SDL audio routines */
 
@@ -110,7 +111,7 @@
 	switch (format) {
 
 		case AUDIO_U8: {
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8);
 #else
 			Uint8 src_sample;
@@ -127,21 +128,21 @@
 		break;
 
 		case AUDIO_S8: {
-#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
+#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S8((char*)dst,(char*)src,(unsigned int)len,(int)volume);
 			}
 			else
 #endif
-#if defined(USE_ASM_MIXER_VC)
+#if defined(_MSC_VER) && defined(M_I86) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S8_VC((char*)dst,(char*)src,(unsigned int)len,(int)volume);
 			}
 			else
 #endif
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume);
 #else
 			{
@@ -174,7 +175,7 @@
 		break;
 
 		case AUDIO_S16LSB: {
-#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
+#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 			if (SDL_HasMMX())
 			{
 				SDL_MixAudio_MMX_S16((char*)dst,(char*)src,(unsigned int)len,(int)volume);
@@ -187,7 +188,7 @@
 			}
 			else
 #endif
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
 #else
 			{
@@ -220,7 +221,7 @@
 		break;
 
 		case AUDIO_S16MSB: {
-#if defined(__M68000__) && defined(__GNUC__)
+#if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
 			SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
 #else
 			Sint16 src1, src2;