Commit 8df87253 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winealsa: Ignore failure to notify winmm wave clients.

parent 04e3bda4
......@@ -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;
}
/**************************************************************************
......
......@@ -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;
}
......
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