Replaced a sanity check with an SDL_assert().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 21 Sep 2011 02:42:25 -0400
changeset 5964 1b5c5625a6ca
parent 5963 fe5d2285dffa
child 5965 dd0c84d3d846
Replaced a sanity check with an SDL_assert().
src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c	Tue Sep 20 17:48:29 2011 -0400
+++ b/src/audio/SDL_audio.c	Wed Sep 21 02:42:25 2011 -0400
@@ -1075,12 +1075,8 @@
     } else {
         id = open_audio_device(NULL, 0, desired, desired, 0, 1);
     }
-    if (id > 1) {               /* this should never happen in theory... */
-        SDL_CloseAudioDevice(id);
-        SDL_SetError("Internal error"); /* MUST be Device ID #1! */
-        return (-1);
-    }
 
+    SDL_assert((id == 0) || (id == 1));
     return ((id == 0) ? -1 : 0);
 }