WINMM: set thread priorities to time critical

Mike McCormack mike at codeweavers.com
Sat May 14 04:48:29 CDT 2005


Missed these ones in the last patch.

ChangeLog:
* set thread priorities to time critical
-------------- next part --------------
Index: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.160
diff -u -p -r1.160 audio.c
--- dlls/winmm/wineoss/audio.c	18 Apr 2005 10:30:55 -0000	1.160
+++ dlls/winmm/wineoss/audio.c	14 May 2005 09:49:06 -0000
@@ -1972,6 +1972,8 @@ DWORD wodOpen(WORD wDevID, LPWAVEOPENDES
 
     wwo->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
     wwo->hThread = CreateThread(NULL, 0, wodPlayer, (LPVOID)(DWORD)wDevID, 0, &(wwo->dwThreadID));
+    if (wwo->hThread)
+        SetThreadPriority(wwo->hThread, THREAD_PRIORITY_TIME_CRITICAL);
     WaitForSingleObject(wwo->hStartUpEvent, INFINITE);
     CloseHandle(wwo->hStartUpEvent);
     wwo->hStartUpEvent = INVALID_HANDLE_VALUE;
@@ -2819,6 +2821,8 @@ DWORD widOpen(WORD wDevID, LPWAVEOPENDES
 
     wwi->hStartUpEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
     wwi->hThread = CreateThread(NULL, 0, widRecorder, (LPVOID)(DWORD)wDevID, 0, &(wwi->dwThreadID));
+    if (wwi->hThread)
+        SetThreadPriority(wwi->hThread, THREAD_PRIORITY_TIME_CRITICAL);
     WaitForSingleObject(wwi->hStartUpEvent, INFINITE);
     CloseHandle(wwi->hStartUpEvent);
     wwi->hStartUpEvent = INVALID_HANDLE_VALUE;
Index: dlls/winmm/wineoss/midi.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/wineoss/midi.c,v
retrieving revision 1.44
diff -u -p -r1.44 midi.c
--- dlls/winmm/wineoss/midi.c	23 Mar 2005 13:15:18 -0000	1.44
+++ dlls/winmm/wineoss/midi.c	14 May 2005 09:49:06 -0000
@@ -739,6 +739,7 @@ static DWORD midOpen(WORD wDevID, LPMIDI
 	    midiCloseSeq();
 	    return MMSYSERR_ERROR;
 	}
+        SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
 	TRACE("Created thread for midi-in\n");
     }
 


More information about the wine-patches mailing list