src/audio/SDL_audio.c
changeset 1330 450721ad5436
parent 1312 c9b51268668f
child 1336 3692456e7b0f
     1.1 --- a/src/audio/SDL_audio.c	Sat Feb 04 22:01:44 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Mon Feb 06 08:28:51 2006 +0000
     1.3 @@ -21,14 +21,12 @@
     1.4  */
     1.5  
     1.6  /* Allow access to a raw mixing buffer */
     1.7 -#include <stdlib.h>
     1.8 -#include <stdio.h>
     1.9 -#include <string.h>
    1.10  
    1.11  #include "SDL.h"
    1.12  #include "SDL_audio.h"
    1.13  #include "SDL_timer.h"
    1.14  #include "SDL_error.h"
    1.15 +#include "SDL_string.h"
    1.16  #include "SDL_audio_c.h"
    1.17  #include "SDL_audiomem.h"
    1.18  #include "SDL_sysaudio.h"
    1.19 @@ -456,7 +454,12 @@
    1.20  	D(bug("Locking semaphore..."));
    1.21  	SDL_mutexP(audio->mixer_lock);
    1.22  
    1.23 +#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
    1.24 +#undef SDL_CreateThread
    1.25 +	audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
    1.26 +#else
    1.27  	audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
    1.28 +#endif
    1.29  	D(bug("Created thread...\n"));
    1.30  
    1.31  	if ( audio->thread == NULL ) {
    1.32 @@ -516,7 +519,12 @@
    1.33  	switch (audio->opened) {
    1.34  		case  1:
    1.35  			/* Start the audio thread */
    1.36 +#if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
    1.37 +#undef SDL_CreateThread
    1.38 +			audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
    1.39 +#else
    1.40  			audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
    1.41 +#endif
    1.42  			if ( audio->thread == NULL ) {
    1.43  				SDL_CloseAudio();
    1.44  				SDL_SetError("Couldn't create audio thread");