diff src/audio/SDL_audio.c @ 1442:e3242177fe4a

Updated OS/2 build, yay!
author Sam Lantinga <slouken@libsdl.org>
date Sun, 26 Feb 2006 19:30:21 +0000
parents ceb5c2fec4f1
children dc6b59e925a2
line wrap: on
line diff
--- 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