Mercurial > sdl-ios-xcode
diff src/audio/dart/SDL_dart.c @ 3796:b19680c84cdf SDL-ryan-multiple-audio-device
Bunch of 1.3 audio cleanups to remove FIXMEs, get driver specific crap out of
the core and into the drivers where it belongs, and push generic
responsibilities out of the drivers and into the core where they belong.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 04 Oct 2006 19:54:23 +0000 |
parents | adf732f1f016 |
children | c8b3d3d13ed1 |
line wrap: on
line diff
--- a/src/audio/dart/SDL_dart.c Wed Oct 04 06:00:10 2006 +0000 +++ b/src/audio/dart/SDL_dart.c Wed Oct 04 19:54:23 2006 +0000 @@ -285,7 +285,25 @@ void DART_ThreadInit(_THIS) { - return; + /* Increase the priority of this thread to make sure that + the audio will be continuous all the time! */ +#ifdef USE_DOSSETPRIORITY + if (SDL_getenv("SDL_USE_TIMECRITICAL_AUDIO")) { +#ifdef DEBUG_BUILD + printf + ("[SDL_RunAudio] : Setting priority to TimeCritical+0! (TID%d)\n", + SDL_ThreadID()); +#endif + DosSetPriority(PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0); + } else { +#ifdef DEBUG_BUILD + printf + ("[SDL_RunAudio] : Setting priority to ForegroundServer+0! (TID%d)\n", + SDL_ThreadID()); +#endif + DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0); + } +#endif } /* This function waits until it is possible to write a full sound buffer */