src/audio/SDL_audio.c
changeset 9399 a684dbd185c7
parent 9398 c41dd34e4996
child 9401 529007547fb6
     1.1 --- a/src/audio/SDL_audio.c	Thu Mar 19 13:34:17 2015 -0400
     1.2 +++ b/src/audio/SDL_audio.c	Thu Mar 19 15:43:00 2015 -0400
     1.3 @@ -400,11 +400,14 @@
     1.4  
     1.5  /* The audio backends call this when a device is removed from the system. */
     1.6  void
     1.7 -SDL_RemoveAudioDevice(void *handle)
     1.8 +SDL_RemoveAudioDevice(const int iscapture, void *handle)
     1.9  {
    1.10      SDL_LockMutex(current_audio.detectionLock);
    1.11 -    mark_device_removed(handle, current_audio.inputDevices, &current_audio.captureDevicesRemoved);
    1.12 -    mark_device_removed(handle, current_audio.outputDevices, &current_audio.outputDevicesRemoved);
    1.13 +    if (iscapture) {
    1.14 +        mark_device_removed(handle, current_audio.inputDevices, &current_audio.captureDevicesRemoved);
    1.15 +    } else {
    1.16 +        mark_device_removed(handle, current_audio.outputDevices, &current_audio.outputDevicesRemoved);
    1.17 +    }
    1.18      SDL_UnlockMutex(current_audio.detectionLock);
    1.19      current_audio.impl.FreeDeviceHandle(handle);
    1.20  }