From 721992db615edc9825b9df54d501a3669c6507c9 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Wed, 9 Mar 2011 02:45:31 +0100 Subject: [PATCH 3/4] winealsa: Ignore failure to notify winmm wave clients. --- dlls/winealsa.drv/wavein.c | 15 ++++++--------- dlls/winealsa.drv/waveout.c | 17 +++++++---------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/dlls/winealsa.drv/wavein.c b/dlls/winealsa.drv/wavein.c index f92f18d..2075805 100644 --- a/dlls/winealsa.drv/wavein.c +++ b/dlls/winealsa.drv/wavein.c @@ -68,7 +68,7 @@ DWORD ALSA_WidNumDevs; /************************************************************************** * widNotifyClient [internal] */ -static DWORD widNotifyClient(WINE_WAVEDEV* wwi, WORD wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) +static void widNotifyClient(WINE_WAVEDEV* wwi, WORD wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { TRACE("wMsg = 0x%04x dwParm1 = %04lX dwParam2 = %04lX\n", wMsg, dwParam1, dwParam2); @@ -80,14 +80,11 @@ static DWORD widNotifyClient(WINE_WAVEDEV* wwi, WORD wMsg, DWORD_PTR dwParam1, D !DriverCallback(wwi->waveDesc.dwCallback, wwi->wFlags, (HDRVR)wwi->waveDesc.hWave, wMsg, wwi->waveDesc.dwInstance, dwParam1, dwParam2)) { WARN("can't notify client !\n"); - return MMSYSERR_ERROR; } break; default: FIXME("Unknown callback message %u\n", wMsg); - return MMSYSERR_INVALPARAM; } - return MMSYSERR_NOERROR; } /************************************************************************** @@ -524,7 +521,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) HeapFree( GetProcessHeap(), 0, hw_params ); HeapFree( GetProcessHeap(), 0, sw_params ); - return widNotifyClient(wwi, WIM_OPEN, 0L, 0L); + widNotifyClient(wwi, WIM_OPEN, 0L, 0L); + return MMSYSERR_NOERROR; error: snd_pcm_close(pcm); @@ -541,7 +539,6 @@ error: */ static DWORD widClose(WORD wDevID) { - DWORD ret = MMSYSERR_NOERROR; WINE_WAVEDEV* wwi; TRACE("(%u);\n", wDevID); @@ -559,7 +556,7 @@ static DWORD widClose(WORD wDevID) wwi = &WInDev[wDevID]; if (wwi->lpQueuePtr) { WARN("buffers still playing !\n"); - ret = WAVERR_STILLPLAYING; + return WAVERR_STILLPLAYING; } else { if (wwi->hThread) { ALSA_AddRingMessage(&wwi->msgRing, WINE_WM_CLOSING, 0, TRUE); @@ -572,10 +569,10 @@ static DWORD widClose(WORD wDevID) snd_pcm_close(wwi->pcm); wwi->pcm = NULL; - ret = widNotifyClient(wwi, WIM_CLOSE, 0L, 0L); + widNotifyClient(wwi, WIM_CLOSE, 0L, 0L); } - return ret; + return MMSYSERR_NOERROR; } /************************************************************************** diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c index 6dcd80f..6c50f89 100644 --- a/dlls/winealsa.drv/waveout.c +++ b/dlls/winealsa.drv/waveout.c @@ -69,7 +69,7 @@ DWORD ALSA_WodNumDevs; /************************************************************************** * wodNotifyClient [internal] */ -static DWORD wodNotifyClient(WINE_WAVEDEV* wwo, WORD wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) +static void wodNotifyClient(WINE_WAVEDEV* wwo, WORD wMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { TRACE("wMsg = 0x%04x dwParm1 = %lx dwParam2 = %lx\n", wMsg, dwParam1, dwParam2); @@ -81,14 +81,11 @@ static DWORD wodNotifyClient(WINE_WAVEDEV* wwo, WORD wMsg, DWORD_PTR dwParam1, D !DriverCallback(wwo->waveDesc.dwCallback, wwo->wFlags, (HDRVR)wwo->waveDesc.hWave, wMsg, wwo->waveDesc.dwInstance, dwParam1, dwParam2)) { WARN("can't notify client !\n"); - return MMSYSERR_ERROR; } break; default: FIXME("Unknown callback message %u\n", wMsg); - return MMSYSERR_INVALPARAM; } - return MMSYSERR_NOERROR; } /************************************************************************** @@ -364,7 +361,7 @@ static void wodPlayer_Reset(WINE_WAVEDEV* wwo, BOOL reset) ((LPWAVEHDR)param)->dwFlags &= ~WHDR_INQUEUE; ((LPWAVEHDR)param)->dwFlags |= WHDR_DONE; - wodNotifyClient(wwo, WOM_DONE, param, 0); + wodNotifyClient(wwo, WOM_DONE, param, 0); } ALSA_ResetRingMessage(&wwo->msgRing); LeaveCriticalSection(&wwo->msgRing.msg_crst); @@ -806,7 +803,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) snd_pcm_hw_params_free(wwo->hw_params); wwo->hw_params = hw_params; - return wodNotifyClient(wwo, WOM_OPEN, 0L, 0L); + wodNotifyClient(wwo, WOM_OPEN, 0L, 0L); + return MMSYSERR_NOERROR; errexit: if (pcm) @@ -834,7 +832,6 @@ errexit: */ static DWORD wodClose(WORD wDevID) { - DWORD ret = MMSYSERR_NOERROR; WINE_WAVEDEV* wwo; TRACE("(%u);\n", wDevID); @@ -852,7 +849,7 @@ static DWORD wodClose(WORD wDevID) wwo = &WOutDev[wDevID]; if (wwo->lpQueuePtr) { WARN("buffers still playing !\n"); - ret = WAVERR_STILLPLAYING; + return WAVERR_STILLPLAYING; } else { if (wwo->hThread) { ALSA_AddRingMessage(&wwo->msgRing, WINE_WM_CLOSING, 0, TRUE); @@ -874,10 +871,10 @@ static DWORD wodClose(WORD wDevID) } wwo->hctl = NULL; - ret = wodNotifyClient(wwo, WOM_CLOSE, 0L, 0L); + wodNotifyClient(wwo, WOM_CLOSE, 0L, 0L); } - return ret; + return MMSYSERR_NOERROR; } -- 1.5.6.3