Increase XAudio thread priority

This commit is contained in:
Nekotekina 2016-08-06 15:40:51 +03:00
parent 9245308ff2
commit 4de513eb01
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,11 @@
XAudio2Thread::XAudio2Thread()
{
if (!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL))
{
LOG_ERROR(GENERAL, "XAudio: failed to increase thread priority");
}
if (auto lib2_7 = LoadLibraryExW(L"XAudio2_7.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32))
{
xa27_init(lib2_7);