src/audio/SDL_mixer.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/audio/SDL_mixer.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/audio/SDL_mixer.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -90,7 +90,7 @@
     1.4  #define ADJUST_VOLUME_U8(s, v)	(s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
     1.5  
     1.6  void
     1.7 -SDL_MixAudio (Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
     1.8 +SDL_MixAudio(Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
     1.9  {
    1.10      Uint16 format;
    1.11  
    1.12 @@ -113,15 +113,15 @@
    1.13      case AUDIO_U8:
    1.14          {
    1.15  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
    1.16 -            SDL_MixAudio_m68k_U8 ((char *) dst, (char *) src,
    1.17 -                                  (unsigned long) len, (long) volume,
    1.18 -                                  (char *) mix8);
    1.19 +            SDL_MixAudio_m68k_U8((char *) dst, (char *) src,
    1.20 +                                 (unsigned long) len, (long) volume,
    1.21 +                                 (char *) mix8);
    1.22  #else
    1.23              Uint8 src_sample;
    1.24  
    1.25              while (len--) {
    1.26                  src_sample = *src;
    1.27 -                ADJUST_VOLUME_U8 (src_sample, volume);
    1.28 +                ADJUST_VOLUME_U8(src_sample, volume);
    1.29                  *dst = mix8[*dst + src_sample];
    1.30                  ++dst;
    1.31                  ++src;
    1.32 @@ -133,19 +133,19 @@
    1.33      case AUDIO_S8:
    1.34          {
    1.35  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
    1.36 -            if (SDL_HasMMX ()) {
    1.37 -                SDL_MixAudio_MMX_S8 ((char *) dst, (char *) src,
    1.38 -                                     (unsigned int) len, (int) volume);
    1.39 +            if (SDL_HasMMX()) {
    1.40 +                SDL_MixAudio_MMX_S8((char *) dst, (char *) src,
    1.41 +                                    (unsigned int) len, (int) volume);
    1.42              } else
    1.43  #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
    1.44 -            if (SDL_HasMMX ()) {
    1.45 -                SDL_MixAudio_MMX_S8_VC ((char *) dst, (char *) src,
    1.46 -                                        (unsigned int) len, (int) volume);
    1.47 +            if (SDL_HasMMX()) {
    1.48 +                SDL_MixAudio_MMX_S8_VC((char *) dst, (char *) src,
    1.49 +                                       (unsigned int) len, (int) volume);
    1.50              } else
    1.51  #endif
    1.52  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
    1.53 -                SDL_MixAudio_m68k_S8 ((char *) dst, (char *) src,
    1.54 -                                      (unsigned long) len, (long) volume);
    1.55 +                SDL_MixAudio_m68k_S8((char *) dst, (char *) src,
    1.56 +                                     (unsigned long) len, (long) volume);
    1.57  #else
    1.58              {
    1.59                  Sint8 *dst8, *src8;
    1.60 @@ -158,7 +158,7 @@
    1.61                  dst8 = (Sint8 *) dst;
    1.62                  while (len--) {
    1.63                      src_sample = *src8;
    1.64 -                    ADJUST_VOLUME (src_sample, volume);
    1.65 +                    ADJUST_VOLUME(src_sample, volume);
    1.66                      dst_sample = *dst8 + src_sample;
    1.67                      if (dst_sample > max_audioval) {
    1.68                          *dst8 = max_audioval;
    1.69 @@ -178,19 +178,19 @@
    1.70      case AUDIO_S16LSB:
    1.71          {
    1.72  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
    1.73 -            if (SDL_HasMMX ()) {
    1.74 -                SDL_MixAudio_MMX_S16 ((char *) dst, (char *) src,
    1.75 -                                      (unsigned int) len, (int) volume);
    1.76 +            if (SDL_HasMMX()) {
    1.77 +                SDL_MixAudio_MMX_S16((char *) dst, (char *) src,
    1.78 +                                     (unsigned int) len, (int) volume);
    1.79              } else
    1.80  #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
    1.81 -            if (SDL_HasMMX ()) {
    1.82 -                SDL_MixAudio_MMX_S16_VC ((char *) dst, (char *) src,
    1.83 -                                         (unsigned int) len, (int) volume);
    1.84 +            if (SDL_HasMMX()) {
    1.85 +                SDL_MixAudio_MMX_S16_VC((char *) dst, (char *) src,
    1.86 +                                        (unsigned int) len, (int) volume);
    1.87              } else
    1.88  #endif
    1.89  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
    1.90 -                SDL_MixAudio_m68k_S16LSB ((short *) dst, (short *) src,
    1.91 -                                          (unsigned long) len, (long) volume);
    1.92 +                SDL_MixAudio_m68k_S16LSB((short *) dst, (short *) src,
    1.93 +                                         (unsigned long) len, (long) volume);
    1.94  #else
    1.95              {
    1.96                  Sint16 src1, src2;
    1.97 @@ -201,7 +201,7 @@
    1.98                  len /= 2;
    1.99                  while (len--) {
   1.100                      src1 = ((src[1]) << 8 | src[0]);
   1.101 -                    ADJUST_VOLUME (src1, volume);
   1.102 +                    ADJUST_VOLUME(src1, volume);
   1.103                      src2 = ((dst[1]) << 8 | dst[0]);
   1.104                      src += 2;
   1.105                      dst_sample = src1 + src2;
   1.106 @@ -223,8 +223,8 @@
   1.107      case AUDIO_S16MSB:
   1.108          {
   1.109  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
   1.110 -            SDL_MixAudio_m68k_S16MSB ((short *) dst, (short *) src,
   1.111 -                                      (unsigned long) len, (long) volume);
   1.112 +            SDL_MixAudio_m68k_S16MSB((short *) dst, (short *) src,
   1.113 +                                     (unsigned long) len, (long) volume);
   1.114  #else
   1.115              Sint16 src1, src2;
   1.116              int dst_sample;
   1.117 @@ -234,7 +234,7 @@
   1.118              len /= 2;
   1.119              while (len--) {
   1.120                  src1 = ((src[0]) << 8 | src[1]);
   1.121 -                ADJUST_VOLUME (src1, volume);
   1.122 +                ADJUST_VOLUME(src1, volume);
   1.123                  src2 = ((dst[0]) << 8 | dst[1]);
   1.124                  src += 2;
   1.125                  dst_sample = src1 + src2;
   1.126 @@ -253,7 +253,7 @@
   1.127          break;
   1.128  
   1.129      default:                   /* If this happens... FIXME! */
   1.130 -        SDL_SetError ("SDL_MixAudio(): unknown audio format");
   1.131 +        SDL_SetError("SDL_MixAudio(): unknown audio format");
   1.132          return;
   1.133      }
   1.134  }