src/audio/SDL_audio.c
changeset 9148 e9b6e9f4a10e
parent 9145 aa99e029b12e
child 9278 8900afb78a19
     1.1 --- a/src/audio/SDL_audio.c	Wed Sep 17 14:49:36 2014 -0400
     1.2 +++ b/src/audio/SDL_audio.c	Thu Sep 18 11:03:34 2014 -0300
     1.3 @@ -1348,26 +1348,17 @@
     1.4  SDL_PauseAudioDevice(SDL_AudioDeviceID devid, int pause_on)
     1.5  {
     1.6      SDL_AudioDevice *device = get_audio_device(devid);
     1.7 -    if (device && device->paused != pause_on) {
     1.8 -        if (pause_on) {
     1.9 -            current_audio.impl.LockDevice(device);
    1.10 -        }
    1.11 +    if (device) {
    1.12 +        current_audio.impl.LockDevice(device);
    1.13          device->paused = pause_on;
    1.14 -        if (!pause_on) {
    1.15 -            current_audio.impl.UnlockDevice(device);
    1.16 -        }
    1.17 +        current_audio.impl.UnlockDevice(device);
    1.18      }
    1.19  }
    1.20  
    1.21  void
    1.22  SDL_PauseAudio(int pause_on)
    1.23  {
    1.24 -    int id;
    1.25 -    for (id = 0; id < SDL_arraysize(open_devices); id++) {
    1.26 -        if (open_devices[id] != NULL) {
    1.27 -            SDL_PauseAudioDevice(id+1, pause_on);
    1.28 -        }
    1.29 -    }
    1.30 +    SDL_PauseAudioDevice(1, pause_on);
    1.31  }
    1.32  
    1.33