From 009ac37a7d35a86ba4adc6f93952008cf9e27225 Mon Sep 17 00:00:00 2001 From: raven02 Date: Tue, 9 Aug 2016 15:55:11 +0800 Subject: [PATCH] XAudio : reorder versioning 2.9>2.7>2.8 (#2048) --- rpcs3/Emu/Audio/XAudio2/XAudio2Thread.cpp | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/rpcs3/Emu/Audio/XAudio2/XAudio2Thread.cpp b/rpcs3/Emu/Audio/XAudio2/XAudio2Thread.cpp index 1ffd343b80..9663387a99 100644 --- a/rpcs3/Emu/Audio/XAudio2/XAudio2Thread.cpp +++ b/rpcs3/Emu/Audio/XAudio2/XAudio2Thread.cpp @@ -13,6 +13,22 @@ XAudio2Thread::XAudio2Thread() LOG_ERROR(GENERAL, "XAudio: failed to increase thread priority"); } + if (auto lib2_9 = LoadLibraryExW(L"XAudio2_9.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32)) + { + // xa28* implementation is fully compatible with library 2.9 + xa28_init(lib2_9); + + m_funcs.destroy = &xa28_destroy; + m_funcs.play = &xa28_play; + m_funcs.flush = &xa28_flush; + m_funcs.stop = &xa28_stop; + m_funcs.open = &xa28_open; + m_funcs.add = &xa28_add; + + LOG_SUCCESS(GENERAL, "XAudio 2.9 initialized"); + return; + } + if (auto lib2_7 = LoadLibraryExW(L"XAudio2_7.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32)) { xa27_init(lib2_7); @@ -28,22 +44,6 @@ XAudio2Thread::XAudio2Thread() return; } - if (auto lib2_9 = LoadLibraryExW(L"XAudio2_9.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32)) - { - // xa28* implementation is fully compatible with library 2.9 - xa28_init(lib2_9); - - m_funcs.destroy = &xa28_destroy; - m_funcs.play = &xa28_play; - m_funcs.flush = &xa28_flush; - m_funcs.stop = &xa28_stop; - m_funcs.open = &xa28_open; - m_funcs.add = &xa28_add; - - LOG_SUCCESS(GENERAL, "XAudio 2.9 initialized"); - return; - } - if (auto lib2_8 = LoadLibraryExW(L"XAudio2_8.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32)) { xa28_init(lib2_8);