effect_position.c
changeset 718 fb0562cc1559
parent 711 f40c5ac95b12
child 725 bdf7b8d20566
     1.1 --- a/effect_position.c	Tue Jan 12 05:56:16 2016 -0800
     1.2 +++ b/effect_position.c	Fri Jan 29 12:44:13 2016 -0800
     1.3 @@ -31,8 +31,9 @@
     1.4  #include <string.h>
     1.5  
     1.6  #include "SDL.h"
     1.7 +#include "SDL_endian.h"
     1.8  #include "SDL_mixer.h"
     1.9 -#include "SDL_endian.h"
    1.10 +#include "mixer.h"
    1.11  
    1.12  #define __MIX_INTERNAL_EFFECT__
    1.13  #include "effects_internal.h"
    1.14 @@ -1453,10 +1454,10 @@
    1.15      if (f == NULL)
    1.16          return(0);
    1.17  
    1.18 -    SDL_LockAudio();
    1.19 +    Mix_LockAudio();
    1.20      args = get_position_arg(channel);
    1.21      if (!args) {
    1.22 -        SDL_UnlockAudio();
    1.23 +        Mix_UnlockAudio();
    1.24          return(0);
    1.25      }
    1.26  
    1.27 @@ -1464,10 +1465,10 @@
    1.28      if ((args->distance_u8 == 255) && (left == 255) && (right == 255)) {
    1.29          if (args->in_use) {
    1.30              retval = _Mix_UnregisterEffect_locked(channel, f);
    1.31 -            SDL_UnlockAudio();
    1.32 +            Mix_UnlockAudio();
    1.33              return(retval);
    1.34          } else {
    1.35 -            SDL_UnlockAudio();
    1.36 +            Mix_UnlockAudio();
    1.37              return(1);
    1.38          }
    1.39      }
    1.40 @@ -1483,7 +1484,7 @@
    1.41          retval=_Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void*)args);
    1.42      }
    1.43  
    1.44 -    SDL_UnlockAudio();
    1.45 +    Mix_UnlockAudio();
    1.46      return(retval);
    1.47  }
    1.48  
    1.49 @@ -1501,10 +1502,10 @@
    1.50      if (f == NULL)
    1.51          return(0);
    1.52  
    1.53 -    SDL_LockAudio();
    1.54 +    Mix_LockAudio();
    1.55      args = get_position_arg(channel);
    1.56      if (!args) {
    1.57 -        SDL_UnlockAudio();
    1.58 +        Mix_UnlockAudio();
    1.59          return(0);
    1.60      }
    1.61  
    1.62 @@ -1514,10 +1515,10 @@
    1.63      if ((distance == 255) && (args->left_u8 == 255) && (args->right_u8 == 255)) {
    1.64          if (args->in_use) {
    1.65              retval = _Mix_UnregisterEffect_locked(channel, f);
    1.66 -            SDL_UnlockAudio();
    1.67 +            Mix_UnlockAudio();
    1.68              return(retval);
    1.69          } else {
    1.70 -            SDL_UnlockAudio();
    1.71 +            Mix_UnlockAudio();
    1.72              return(1);
    1.73          }
    1.74      }
    1.75 @@ -1529,7 +1530,7 @@
    1.76          retval = _Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void *) args);
    1.77      }
    1.78  
    1.79 -    SDL_UnlockAudio();
    1.80 +    Mix_UnlockAudio();
    1.81      return(retval);
    1.82  }
    1.83  
    1.84 @@ -1550,10 +1551,10 @@
    1.85  
    1.86      angle = SDL_abs(angle) % 360;  /* make angle between 0 and 359. */
    1.87  
    1.88 -    SDL_LockAudio();
    1.89 +    Mix_LockAudio();
    1.90      args = get_position_arg(channel);
    1.91      if (!args) {
    1.92 -        SDL_UnlockAudio();
    1.93 +        Mix_UnlockAudio();
    1.94          return(0);
    1.95      }
    1.96  
    1.97 @@ -1561,10 +1562,10 @@
    1.98      if ((!distance) && (!angle)) {
    1.99          if (args->in_use) {
   1.100              retval = _Mix_UnregisterEffect_locked(channel, f);
   1.101 -            SDL_UnlockAudio();
   1.102 +            Mix_UnlockAudio();
   1.103              return(retval);
   1.104          } else {
   1.105 -            SDL_UnlockAudio();
   1.106 +            Mix_UnlockAudio();
   1.107              return(1);
   1.108          }
   1.109      }
   1.110 @@ -1610,7 +1611,7 @@
   1.111          retval = _Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void *) args);
   1.112      }
   1.113  
   1.114 -    SDL_UnlockAudio();
   1.115 +    Mix_UnlockAudio();
   1.116      return(retval);
   1.117  }
   1.118