src/audio/SDL_audio.c
changeset 1330 450721ad5436
parent 1312 c9b51268668f
child 1336 3692456e7b0f
--- a/src/audio/SDL_audio.c	Sat Feb 04 22:01:44 2006 +0000
+++ b/src/audio/SDL_audio.c	Mon Feb 06 08:28:51 2006 +0000
@@ -21,14 +21,12 @@
 */
 
 /* Allow access to a raw mixing buffer */
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
 
 #include "SDL.h"
 #include "SDL_audio.h"
 #include "SDL_timer.h"
 #include "SDL_error.h"
+#include "SDL_string.h"
 #include "SDL_audio_c.h"
 #include "SDL_audiomem.h"
 #include "SDL_sysaudio.h"
@@ -456,7 +454,12 @@
 	D(bug("Locking semaphore..."));
 	SDL_mutexP(audio->mixer_lock);
 
+#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#undef SDL_CreateThread
+	audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
+#else
 	audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
+#endif
 	D(bug("Created thread...\n"));
 
 	if ( audio->thread == NULL ) {
@@ -516,7 +519,12 @@
 	switch (audio->opened) {
 		case  1:
 			/* Start the audio thread */
+#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#undef SDL_CreateThread
+			audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
+#else
 			audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
+#endif
 			if ( audio->thread == NULL ) {
 				SDL_CloseAudio();
 				SDL_SetError("Couldn't create audio thread");