diff src/audio/arts/SDL_artsaudio.c @ 3813:92f7304e50ff SDL-ryan-multiple-audio-device

Removed duplicate state from arts driver.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 06 Oct 2006 03:32:48 +0000
parents 35d1367020a3
children 8e1af9ff0e1f
line wrap: on
line diff
--- a/src/audio/arts/SDL_artsaudio.c	Fri Oct 06 02:40:02 2006 +0000
+++ b/src/audio/arts/SDL_artsaudio.c	Fri Oct 06 03:32:48 2006 +0000
@@ -51,7 +51,6 @@
 
 static const char *arts_library = SDL_AUDIO_DRIVER_ARTS_DYNAMIC;
 static void *arts_handle = NULL;
-static int arts_loaded = 0;
 
 /* !!! FIXME: I hate this SDL_NAME clutter...it makes everything so messy! */
 static int (*SDL_NAME(arts_init)) (void);
@@ -89,10 +88,9 @@
 static void
 UnloadARTSLibrary()
 {
-    if (arts_loaded) {
+    if (arts_handle != NULL) {
         SDL_UnloadObject(arts_handle);
         arts_handle = NULL;
-        arts_loaded = 0;
     }
 }
 
@@ -101,10 +99,9 @@
 {
     int i, retval = -1;
 
-    if (!arts_loaded) {
+    if (arts_handle == NULL) {
         arts_handle = SDL_LoadObject(arts_library);
-        if (arts_handle) {
-            arts_loaded = 1;
+        if (arts_handle != NULL) {
             retval = 0;
             for (i = 0; i < SDL_arraysize(arts_functions); ++i) {
                 *arts_functions[i].func =