Commit 91f3fc7d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed bug in cache init.

parent 1282ef94
......@@ -73,8 +73,7 @@ static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid)
HACMDRIVER had = 0;
int ntag;
ACMDRIVERDETAILSW add;
ACMFORMATDETAILSW aftd;
WAVEFORMATEX wfx;
ACMFORMATTAGDETAILSW aftd;
if (acmDriverOpen(&had, (HACMDRIVERID)padid, 0) != 0)
return FALSE;
......@@ -95,18 +94,15 @@ static BOOL MSACM_FillCache(PWINE_ACMDRIVERID padid)
padid->fdwSupport = add.fdwSupport;
aftd.cbStruct = sizeof(aftd);
/* don't care about retrieving full struct... so a bare WAVEFORMATEX should do */
aftd.pwfx = &wfx;
aftd.cbwfx = sizeof(wfx);
for (ntag = 0; ntag < add.cFormatTags; ntag++) {
aftd.dwFormatIndex = ntag;
if (MSACM_Message(had, ACMDM_FORMAT_DETAILS, (LPARAM)&aftd, ACM_FORMATDETAILSF_INDEX)) {
aftd.dwFormatTagIndex = ntag;
if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS, (LPARAM)&aftd, ACM_FORMATTAGDETAILSF_INDEX)) {
TRACE("IIOs (%s)\n", padid->pszDriverAlias);
goto errCleanUp;
}
padid->aFormatTag[ntag].dwFormatTag = aftd.dwFormatTag;
padid->aFormatTag[ntag].cbwfx = aftd.cbwfx;
padid->aFormatTag[ntag].cbwfx = aftd.cbFormatSize;
}
acmDriverClose(had, 0);
......
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