Fixed off-by-one error in SDL_AudioQuit() (thanks, Rainer!).
authorRyan C. Gordon <icculus@icculus.org>
Sun, 14 Jul 2013 11:28:18 -0400
changeset 7446 6cbb6aaedc20
parent 7445 bf50f0b74811
child 7447 6860de5bcb8c
Fixed off-by-one error in SDL_AudioQuit() (thanks, Rainer!). Audio Devices IDs are offset by one. Fixes Bugzilla #1971.
src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c	Sun Jul 14 14:32:26 2013 +0200
+++ b/src/audio/SDL_audio.c	Sun Jul 14 11:28:18 2013 -0400
@@ -1184,7 +1184,7 @@
 
     for (i = 0; i < SDL_arraysize(open_devices); i++) {
         if (open_devices[i] != NULL) {
-            SDL_CloseAudioDevice(i);
+            SDL_CloseAudioDevice(i+1);
         }
     }