79591: [PATCH 2/4 (try2)] winecfg: Reload winmm for each sound test

buildbot at kegel.com buildbot at kegel.com
Wed Oct 5 23:22:20 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-ati while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-ati/builds/137 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed git

Errors:
error: patch failed: dlls/winealsa.drv/Makefile.in:1
error: dlls/winealsa.drv/Makefile.in: patch does not apply
error: patch failed: dlls/winecoreaudio.drv/Makefile.in:1
error: dlls/winecoreaudio.drv/Makefile.in: patch does not apply
error: patch failed: dlls/wineoss.drv/Makefile.in:1
error: dlls/wineoss.drv/Makefile.in: patch does not apply
error: patch failed: programs/winecfg/Makefile.in:1
error: programs/winecfg/Makefile.in: patch does not apply
error: patch failed: programs/winecfg/audio.c:115
error: programs/winecfg/audio.c: patch does not apply
error: patch failed: programs/winecfg/resource.h:174
error: programs/winecfg/resource.h: patch does not apply
error: patch failed: programs/winecfg/winecfg.rc:86
error: programs/winecfg/winecfg.rc: patch does not apply

-------------- next part --------------
From: Andrew Eikum <aeikum at codeweavers.com>
Subject: [PATCH 1/4 (try2)] audio: Change winmm import to delayed import
Message-Id: <20111005183934.GA9338 at foghorn.codeweavers.com>
Date: Wed, 5 Oct 2011 13:39:34 -0500

---
 dlls/winealsa.drv/Makefile.in      |    3 ++-
 dlls/winecoreaudio.drv/Makefile.in |    3 ++-
 dlls/wineoss.drv/Makefile.in       |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/winealsa.drv/Makefile.in b/dlls/winealsa.drv/Makefile.in
index c5f8cde..336da8b 100644
--- a/dlls/winealsa.drv/Makefile.in
+++ b/dlls/winealsa.drv/Makefile.in
@@ -1,5 +1,6 @@
 MODULE    = winealsa.drv
-IMPORTS   = uuid winmm ole32
+IMPORTS   = uuid ole32
+DELAYIMPORTS = winmm
 EXTRALIBS = @ALSALIBS@
 
 C_SRCS = \
diff --git a/dlls/winecoreaudio.drv/Makefile.in b/dlls/winecoreaudio.drv/Makefile.in
index f0598aa..ff0a500 100644
--- a/dlls/winecoreaudio.drv/Makefile.in
+++ b/dlls/winecoreaudio.drv/Makefile.in
@@ -1,5 +1,6 @@
 MODULE    = winecoreaudio.drv
-IMPORTS   = uuid winmm ole32 user32
+IMPORTS   = uuid ole32 user32
+DELAYIMPORTS = winmm
 EXTRALIBS = @COREAUDIO@
 
 C_SRCS = \
diff --git a/dlls/wineoss.drv/Makefile.in b/dlls/wineoss.drv/Makefile.in
index 61b466b..3edf9d3 100644
--- a/dlls/wineoss.drv/Makefile.in
+++ b/dlls/wineoss.drv/Makefile.in
@@ -1,5 +1,6 @@
 MODULE    = wineoss.drv
-IMPORTS   = uuid winmm ole32 user32
+IMPORTS   = uuid ole32 user32
+DELAYIMPORTS = winmm
 EXTRAINCL = @OSS4INCL@
 
 C_SRCS = \

From: Andrew Eikum <aeikum at codeweavers.com>
Subject: [PATCH 2/4 (try2)] winecfg: Reload winmm for each sound test
Message-Id: <20111005183946.GB9338 at foghorn.codeweavers.com>
Date: Wed, 5 Oct 2011 13:39:46 -0500


Also localize the error dialog while we're in there.
---
 programs/winecfg/Makefile.in |    2 +-
 programs/winecfg/audio.c     |   37 +++++++++++++++++++++++++++++++++++--
 programs/winecfg/resource.h  |    2 ++
 programs/winecfg/winecfg.rc  |    2 ++
 4 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in
index 9aafe32..439dcbc 100644
--- a/programs/winecfg/Makefile.in
+++ b/programs/winecfg/Makefile.in
@@ -1,6 +1,6 @@
 MODULE    = winecfg.exe
 APPMODE   = -mwindows
-IMPORTS   = uuid comdlg32 comctl32 shell32 ole32 winmm shlwapi uxtheme user32 gdi32 advapi32
+IMPORTS   = uuid comdlg32 comctl32 shell32 ole32 shlwapi uxtheme user32 gdi32 advapi32
 
 C_SRCS = \
 	about.c \
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 301e309..2afc926 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -115,6 +115,40 @@ static void initAudioDlg (HWND hDlg)
     SetDlgItemTextW(hDlg, IDC_AUDIO_DRIVER, display_str);
 }
 
+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)){
+        WCHAR error_str[256], title_str[256];
+
+        LoadStringW(GetModuleHandle(NULL), IDS_AUDIO_TEST_FAILED,
+                error_str, sizeof(error_str) / sizeof(*error_str));
+        LoadStringW(GetModuleHandle(NULL), IDS_AUDIO_TEST_FAILED_TITLE,
+                title_str, sizeof(title_str) / sizeof(*title_str));
+
+        MessageBoxW(NULL, error_str, title_str, MB_OK | MB_ICONERROR);
+    }
+
+    FreeLibrary(winmm);
+}
+
 INT_PTR CALLBACK
 AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
@@ -122,8 +156,7 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
       case WM_COMMAND:
         switch (LOWORD(wParam)) {
           case IDC_AUDIO_TEST:
-              if(!PlaySound(MAKEINTRESOURCE(IDW_TESTSOUND), NULL, SND_RESOURCE | SND_SYNC))
-                  MessageBox(NULL, "Audio test failed!", "Error", MB_OK | MB_ICONERROR);
+              test_sound();
               break;
         }
       case WM_SHOWWINDOW:
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 409accb..89999be 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -174,6 +174,8 @@
 #define IDS_AUDIO_DRIVER                1302
 #define IDS_AUDIO_DRIVER_NONE           1303
 #define IDW_TESTSOUND                   1308
+#define IDS_AUDIO_TEST_FAILED           1309
+#define IDS_AUDIO_TEST_FAILED_TITLE     1310
 
 /* desktop integration tab */
 #define IDC_THEME_COLORCOMBO            1401
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index bdce5b0..bed79e5 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -86,6 +86,8 @@ STRINGTABLE
 BEGIN
     IDS_AUDIO_DRIVER "Selected driver: %s"
     IDS_AUDIO_DRIVER_NONE "(None)"
+    IDS_AUDIO_TEST_FAILED "Audio test failed!"
+    IDS_AUDIO_TEST_FAILED_TITLE "Error"
 END
 
 STRINGTABLE



More information about the wine-tests-results mailing list