Commit 00629cb0 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winecfg: Don't reload winmm for each audio test.

parent cb1dd010
MODULE = winecfg.exe
APPMODE = -mwindows
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 shlwapi uxtheme user32 gdi32 advapi32
IMPORTS = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32
C_SRCS = \
about.c \
......
......@@ -305,25 +305,7 @@ static void set_reg_device(HWND hDlg, int dlgitem, const WCHAR *key_name)
static void test_sound(void)
{
BOOL (WINAPI *pPlaySoundW)(const WCHAR *, HMODULE, DWORD);
HMODULE winmm;
static const WCHAR winmmW[] = {'w','i','n','m','m','.','d','l','l',0};
winmm = LoadLibraryW(winmmW);
if(!winmm){
WINE_ERR("LoadLibrary failed: %u\n", GetLastError());
return;
}
pPlaySoundW = (void*)GetProcAddress(winmm, "PlaySoundW");
if(!pPlaySoundW){
WINE_ERR("GetProcAddress failed: %u\n", GetLastError());
FreeLibrary(winmm);
return;
}
if(!pPlaySoundW(MAKEINTRESOURCEW(IDW_TESTSOUND), NULL, SND_RESOURCE | SND_SYNC)){
if(!PlaySoundW(MAKEINTRESOURCEW(IDW_TESTSOUND), NULL, SND_RESOURCE | SND_SYNC)){
WCHAR error_str[256], title_str[256];
LoadStringW(GetModuleHandle(NULL), IDS_AUDIO_TEST_FAILED,
......@@ -333,8 +315,6 @@ static void test_sound(void)
MessageBoxW(NULL, error_str, title_str, MB_OK | MB_ICONERROR);
}
FreeLibrary(winmm);
}
INT_PTR CALLBACK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment