Commit 07dc3c54 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

msacm: reroute all SendDriverMessage() calls to MSACM_Message.

parent d20addf4
...@@ -447,7 +447,7 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA ...@@ -447,7 +447,7 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
if (padid) { if (padid) {
/* Handle is really an HACMDRIVERID, must have an open session to get an HACMDRIVER */ /* Handle is really an HACMDRIVERID, must have an open session to get an HACMDRIVER */
if (padid->pACMDriverList != NULL) { if (padid->pACMDriverList != NULL) {
lResult = SendDriverMessage(padid->pACMDriverList->hDrvr, uMsg, lParam1, lParam2); lResult = MSACM_Message((HACMDRIVER)padid->pACMDriverList, uMsg, lParam1, lParam2);
} else { } else {
MMRESULT mmr = acmDriverOpen(&had, (HACMDRIVERID)padid, 0); MMRESULT mmr = acmDriverOpen(&had, (HACMDRIVERID)padid, 0);
if (mmr != MMSYSERR_NOERROR) { if (mmr != MMSYSERR_NOERROR) {
......
...@@ -64,7 +64,7 @@ MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose) ...@@ -64,7 +64,7 @@ MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)
WARN("invalid handle\n"); WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
} }
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CLOSE, (LPARAM)&was->drvInst, 0);
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
if (was->hAcmDriver) if (was->hAcmDriver)
acmDriverClose(was->hAcmDriver, 0L); acmDriverClose(was->hAcmDriver, 0L);
...@@ -119,7 +119,7 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash, ...@@ -119,7 +119,7 @@ MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwConvert; padsh->fdwConvert = fdwConvert;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_CONVERT, (LPARAM)&was->drvInst, (LPARAM)padsh); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_CONVERT, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
padsh->fdwStatus |= ACMSTREAMHEADER_STATUSF_DONE; padsh->fdwStatus |= ACMSTREAMHEADER_STATUSF_DONE;
} }
...@@ -231,7 +231,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw ...@@ -231,7 +231,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad; was->pDrv = wad;
was->hAcmDriver = 0; /* not to close it in acmStreamClose */ was->hAcmDriver = 0; /* not to close it in acmStreamClose */
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L); ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
if (ret != MMSYSERR_NOERROR) if (ret != MMSYSERR_NOERROR)
goto errCleanUp; goto errCleanUp;
} else { } else {
...@@ -252,7 +252,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw ...@@ -252,7 +252,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw
was->pDrv = wad; was->pDrv = wad;
was->hAcmDriver = had; was->hAcmDriver = had;
ret = SendDriverMessage(wad->hDrvr, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L); ret = MSACM_Message((HACMDRIVER)wad, ACMDM_STREAM_OPEN, (LPARAM)&was->drvInst, 0L);
TRACE("%s => %08x\n", debugstr_w(wadi->pszDriverAlias), ret); TRACE("%s => %08x\n", debugstr_w(wadi->pszDriverAlias), ret);
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
if (fdwOpen & ACM_STREAMOPENF_QUERY) { if (fdwOpen & ACM_STREAMOPENF_QUERY) {
...@@ -329,7 +329,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, ...@@ -329,7 +329,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->pbPreparedDst = 0; padsh->pbPreparedDst = 0;
padsh->cbPreparedDstLength = 0; padsh->cbPreparedDstLength = 0;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) { if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR; ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE); padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);
...@@ -369,7 +369,7 @@ MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset) ...@@ -369,7 +369,7 @@ MMRESULT WINAPI acmStreamReset(HACMSTREAM has, DWORD fdwReset)
WARN("invalid handle\n"); WARN("invalid handle\n");
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
} else if (was->drvInst.fdwOpen & ACM_STREAMOPENF_ASYNC) { } else if (was->drvInst.fdwOpen & ACM_STREAMOPENF_ASYNC) {
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_RESET, (LPARAM)&was->drvInst, 0); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_RESET, (LPARAM)&was->drvInst, 0);
} }
TRACE("=> (%d)\n", ret); TRACE("=> (%d)\n", ret);
return ret; return ret;
...@@ -414,7 +414,7 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput, ...@@ -414,7 +414,7 @@ MMRESULT WINAPI acmStreamSize(HACMSTREAM has, DWORD cbInput,
adss.cbStruct = sizeof(adss); adss.cbStruct = sizeof(adss);
adss.fdwSize = fdwSize; adss.fdwSize = fdwSize;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_SIZE, ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_SIZE,
(LPARAM)&was->drvInst, (LPARAM)&adss); (LPARAM)&was->drvInst, (LPARAM)&adss);
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) { switch (fdwSize & ACM_STREAMSIZEF_QUERYMASK) {
...@@ -472,7 +472,7 @@ MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, ...@@ -472,7 +472,7 @@ MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->fdwConvert = fdwUnprepare; padsh->fdwConvert = fdwUnprepare;
ret = SendDriverMessage(was->pDrv->hDrvr, ACMDM_STREAM_UNPREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_UNPREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh);
if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) { if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) {
ret = MMSYSERR_NOERROR; ret = MMSYSERR_NOERROR;
padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE|ACMSTREAMHEADER_STATUSF_PREPARED); padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE|ACMSTREAMHEADER_STATUSF_PREPARED);
......
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