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