equal
deleted
inserted
replaced
446 return(-1); |
446 return(-1); |
447 } |
447 } |
448 #else |
448 #else |
449 D(bug("Locking semaphore...")); |
449 D(bug("Locking semaphore...")); |
450 SDL_mutexP(audio->mixer_lock); |
450 SDL_mutexP(audio->mixer_lock); |
451 #endif |
451 |
452 |
452 |
453 #if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC) |
|
454 #undef SDL_CreateThread |
|
455 audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL); |
|
456 #else |
|
457 audio->thread = SDL_CreateThread(SDL_RunAudio, audio); |
453 audio->thread = SDL_CreateThread(SDL_RunAudio, audio); |
458 #endif |
|
459 D(bug("Created thread...\n")); |
454 D(bug("Created thread...\n")); |
460 |
455 |
461 if ( audio->thread == NULL ) { |
456 if ( audio->thread == NULL ) { |
462 SDL_mutexV(audio->mixer_lock); |
457 SDL_mutexV(audio->mixer_lock); |
463 SDL_CloseAudio(); |
458 SDL_CloseAudio(); |
464 SDL_SetError("Couldn't create audio thread"); |
459 SDL_SetError("Couldn't create audio thread"); |
465 return(-1); |
460 return(-1); |
466 } |
461 } |
467 |
462 |
468 #if SDL_AUDIO_DRIVER_AHI |
|
469 while(!audio_configured) |
463 while(!audio_configured) |
470 SDL_Delay(100); |
464 SDL_Delay(100); |
471 #endif |
465 #endif |
472 |
466 |
473 /* If the audio driver changes the buffer size, accept it */ |
467 /* If the audio driver changes the buffer size, accept it */ |