src/audio/SDL_audio.c
changeset 1442 e3242177fe4a
parent 1408 ceb5c2fec4f1
child 1487 dc6b59e925a2
--- a/src/audio/SDL_audio.c	Sun Feb 26 13:42:00 2006 +0000
+++ b/src/audio/SDL_audio.c	Sun Feb 26 19:30:21 2006 +0000
@@ -181,10 +181,20 @@
         // 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 ForegroundServer+0! (TID%d)\n", SDL_ThreadID());
+          printf("[SDL_RunAudio] : Setting priority to TimeCritical+0! (TID%d)\n", SDL_ThreadID());
 #endif
-        DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+          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
 #endif