src/audio/SDL_mixer.c
changeset 633 873c2598f969
parent 574 64fe373be3dc
child 739 22dbf364c017
     1.1 --- a/src/audio/SDL_mixer.c	Mon Jun 02 14:50:22 2003 +0000
     1.2 +++ b/src/audio/SDL_mixer.c	Tue Jun 03 19:35:10 2003 +0000
     1.3 @@ -37,6 +37,7 @@
     1.4  #include "SDL_sysaudio.h"
     1.5  #include "SDL_mixer_MMX.h"
     1.6  #include "SDL_mixer_MMX_VC.h"
     1.7 +#include "SDL_mixer_m68k.h"
     1.8  
     1.9  /* Function to check the CPU flags */
    1.10  #define MMX_CPU		0x800000
    1.11 @@ -135,6 +136,9 @@
    1.12  	switch (format) {
    1.13  
    1.14  		case AUDIO_U8: {
    1.15 +#if defined(__M68000__) && defined(__GNUC__)
    1.16 +			SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8);
    1.17 +#else
    1.18  			Uint8 src_sample;
    1.19  
    1.20  			while ( len-- ) {
    1.21 @@ -144,6 +148,7 @@
    1.22  				++dst;
    1.23  				++src;
    1.24  			}
    1.25 +#endif
    1.26  		}
    1.27  		break;
    1.28  
    1.29 @@ -162,6 +167,9 @@
    1.30  			}
    1.31  			else
    1.32  #endif
    1.33 +#if defined(__M68000__) && defined(__GNUC__)
    1.34 +			SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume);
    1.35 +#else
    1.36  			{
    1.37  			Sint8 *dst8, *src8;
    1.38  			Sint8 src_sample;
    1.39 @@ -187,6 +195,7 @@
    1.40  				++src8;
    1.41  			}
    1.42  			}
    1.43 +#endif
    1.44  		}
    1.45  		break;
    1.46  
    1.47 @@ -204,6 +213,9 @@
    1.48  			}
    1.49  			else
    1.50  #endif
    1.51 +#if defined(__M68000__) && defined(__GNUC__)
    1.52 +			SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
    1.53 +#else
    1.54  			{
    1.55  			Sint16 src1, src2;
    1.56  			int dst_sample;
    1.57 @@ -229,10 +241,14 @@
    1.58  				dst += 2;
    1.59  			}
    1.60  			}
    1.61 +#endif
    1.62  		}
    1.63  		break;
    1.64  
    1.65  		case AUDIO_S16MSB: {
    1.66 +#if defined(__M68000__) && defined(__GNUC__)
    1.67 +			SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
    1.68 +#else
    1.69  			Sint16 src1, src2;
    1.70  			int dst_sample;
    1.71  			const int max_audioval = ((1<<(16-1))-1);
    1.72 @@ -256,6 +272,7 @@
    1.73  				dst[0] = dst_sample&0xFF;
    1.74  				dst += 2;
    1.75  			}
    1.76 +#endif
    1.77  		}
    1.78  		break;
    1.79