Commit 52130bde4096723011ea9ef4b2ce08223ab5ff5e

Ryan C. Gordon 2017-01-05T19:30:45

diskaudio: Use SDL_Log, not fprintf.

diff --git a/src/audio/disk/SDL_diskaudio.c b/src/audio/disk/SDL_diskaudio.c
index e8f854b..cfa7e76 100644
--- a/src/audio/disk/SDL_diskaudio.c
+++ b/src/audio/disk/SDL_diskaudio.c
@@ -33,6 +33,7 @@
 #include "SDL_audio.h"
 #include "../SDL_audio_c.h"
 #include "SDL_diskaudio.h"
+#include "SDL_log.h"
 
 /* !!! FIXME: these should be SDL hints, not environment variables. */
 /* environment variables and defaults. */
@@ -160,12 +161,11 @@ DISKAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
         SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
     }
 
-#if HAVE_STDIO_H
-    fprintf(stderr,
-            "WARNING: You are using the SDL disk i/o audio driver!\n"
-            " %s file [%s].\n", iscapture ? "Reading from" : "Writing to",
-            fname);
-#endif
+    SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO,
+                "You are using the SDL disk i/o audio driver!\n");
+    SDL_LogCritical(SDL_LOG_CATEGORY_AUDIO,
+                " %s file [%s].\n", iscapture ? "Reading from" : "Writing to",
+                fname);
 
     /* We're ready to rock and roll. :-) */
     return 0;