mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
Set thread priorities to time critical.
This commit is contained in:
parent
4cc3b97ec1
commit
66cee15084
2 changed files with 5 additions and 0 deletions
|
@ -1972,6 +1972,8 @@ DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
|
||||
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, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
|||
|
||||
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;
|
||||
|
|
|
@ -739,6 +739,7 @@ static DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
|||
midiCloseSeq();
|
||||
return MMSYSERR_ERROR;
|
||||
}
|
||||
SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
|
||||
TRACE("Created thread for midi-in\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue