Commit 9b228bb7 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msacm32: Fix some Win64 problems.

- dwInstance and dwDriver are a DWORD_PTR. - acmF*Enum functions take a DWORD_PTR as 4th parameter. - The last parameter of SendDlgItemMessage and MSACM_Message is a LPARAM.
parent a6f512ff
...@@ -138,7 +138,7 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, ...@@ -138,7 +138,7 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd,
struct MSACM_FilterEnumWtoA_Instance { struct MSACM_FilterEnumWtoA_Instance {
PACMFILTERDETAILSA pafda; PACMFILTERDETAILSA pafda;
DWORD dwInstance; DWORD_PTR dwInstance;
ACMFILTERENUMCBA fnCallback; ACMFILTERENUMCBA fnCallback;
}; };
...@@ -183,13 +183,13 @@ MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda, ...@@ -183,13 +183,13 @@ MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda,
afei.fnCallback = fnCallback; afei.fnCallback = fnCallback;
return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA, return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA,
(DWORD)&afei, fdwEnum); (DWORD_PTR)&afei, fdwEnum);
} }
static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFILTERDETAILSW pafd, PACMFILTERDETAILSW pafd,
ACMFILTERENUMCBW fnCallback, DWORD dwInstance, ACMFILTERENUMCBW fnCallback,
DWORD fdwEnum) DWORD_PTR dwInstance, DWORD fdwEnum)
{ {
ACMFILTERTAGDETAILSW aftd; ACMFILTERTAGDETAILSW aftd;
unsigned int i, j; unsigned int i, j;
...@@ -369,7 +369,7 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd ...@@ -369,7 +369,7 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd
struct MSACM_FilterTagEnumWtoA_Instance { struct MSACM_FilterTagEnumWtoA_Instance {
PACMFILTERTAGDETAILSA paftda; PACMFILTERTAGDETAILSA paftda;
DWORD dwInstance; DWORD_PTR dwInstance;
ACMFILTERTAGENUMCBA fnCallback; ACMFILTERTAGENUMCBA fnCallback;
}; };
...@@ -414,7 +414,7 @@ MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda, ...@@ -414,7 +414,7 @@ MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda,
aftei.fnCallback = fnCallback; aftei.fnCallback = fnCallback;
return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA, return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum); (DWORD_PTR)&aftei, fdwEnum);
} }
/*********************************************************************** /***********************************************************************
......
...@@ -62,10 +62,10 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, ...@@ -62,10 +62,10 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
switch (affd->mode) { switch (affd->mode) {
case WINE_ACMFF_TAG: case WINE_ACMFF_TAG:
if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_FINDSTRINGEXACT, CB_FINDSTRINGEXACT, -1,
(WPARAM)-1, (LPARAM)paftd->szFormatTag) == CB_ERR) (LPARAM)paftd->szFormatTag) == CB_ERR)
SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_ADDSTRING, 0, (DWORD)paftd->szFormatTag); CB_ADDSTRING, 0, (LPARAM)paftd->szFormatTag);
break; break;
case WINE_ACMFF_FORMAT: case WINE_ACMFF_FORMAT:
if (strcmp(affd->szFormatTag, paftd->szFormatTag) == 0) { if (strcmp(affd->szFormatTag, paftd->szFormatTag) == 0) {
...@@ -97,7 +97,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, ...@@ -97,7 +97,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
(afd.pwfx->nAvgBytesPerSec + 512) / 1024); (afd.pwfx->nAvgBytesPerSec + 512) / 1024);
SendDlgItemMessageA(affd->hWnd, SendDlgItemMessageA(affd->hWnd,
IDD_ACMFORMATCHOOSE_CMB_FORMAT, IDD_ACMFORMATCHOOSE_CMB_FORMAT,
CB_ADDSTRING, 0, (DWORD)buffer); CB_ADDSTRING, 0, (LPARAM)buffer);
} }
} }
acmDriverClose(had, 0); acmDriverClose(had, 0);
...@@ -145,7 +145,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd) ...@@ -145,7 +145,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd)
affd.hWnd = hWnd; affd.hWnd = hWnd;
affd.mode = WINE_ACMFF_TAG; affd.mode = WINE_ACMFF_TAG;
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0);
return TRUE; return TRUE;
} }
...@@ -166,9 +166,9 @@ static BOOL MSACM_FillFormat(HWND hWnd) ...@@ -166,9 +166,9 @@ static BOOL MSACM_FillFormat(HWND hWnd)
CB_GETLBTEXT, CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0), CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag); (LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0);
return TRUE; return TRUE;
} }
...@@ -189,9 +189,9 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc) ...@@ -189,9 +189,9 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc)
CB_GETLBTEXT, CB_GETLBTEXT,
SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG,
CB_GETCURSEL, 0, 0), CB_GETCURSEL, 0, 0),
(DWORD)affd.szFormatTag); (LPARAM)affd.szFormatTag);
acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0);
return affd.ret; return affd.ret;
} }
...@@ -378,7 +378,7 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD ...@@ -378,7 +378,7 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
struct MSACM_FormatEnumWtoA_Instance { struct MSACM_FormatEnumWtoA_Instance {
PACMFORMATDETAILSA pafda; PACMFORMATDETAILSA pafda;
DWORD dwInstance; DWORD_PTR dwInstance;
ACMFORMATENUMCBA fnCallback; ACMFORMATENUMCBA fnCallback;
}; };
...@@ -429,7 +429,7 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda, ...@@ -429,7 +429,7 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
afei.fnCallback = fnCallback; afei.fnCallback = fnCallback;
return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA, return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA,
(DWORD)&afei, fdwEnum); (DWORD_PTR)&afei, fdwEnum);
} }
/*********************************************************************** /***********************************************************************
...@@ -437,8 +437,8 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda, ...@@ -437,8 +437,8 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda,
*/ */
static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef,
ACMFORMATENUMCBW fnCallback, DWORD dwInstance, ACMFORMATENUMCBW fnCallback,
DWORD fdwEnum) DWORD_PTR dwInstance, DWORD fdwEnum)
{ {
ACMFORMATTAGDETAILSW aftd; ACMFORMATTAGDETAILSW aftd;
unsigned int i, j; unsigned int i, j;
...@@ -706,7 +706,7 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd ...@@ -706,7 +706,7 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd
struct MSACM_FormatTagEnumWtoA_Instance { struct MSACM_FormatTagEnumWtoA_Instance {
PACMFORMATTAGDETAILSA paftda; PACMFORMATTAGDETAILSA paftda;
DWORD dwInstance; DWORD_PTR dwInstance;
ACMFORMATTAGENUMCBA fnCallback; ACMFORMATTAGENUMCBA fnCallback;
}; };
...@@ -760,7 +760,7 @@ MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda, ...@@ -760,7 +760,7 @@ MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda,
aftei.fnCallback = fnCallback; aftei.fnCallback = fnCallback;
return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA, return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA,
(DWORD)&aftei, fdwEnum); (DWORD_PTR)&aftei, fdwEnum);
} }
/*********************************************************************** /***********************************************************************
......
...@@ -894,7 +894,7 @@ static LRESULT PCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi) ...@@ -894,7 +894,7 @@ static LRESULT PCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
return MMSYSERR_NOMEM; return MMSYSERR_NOMEM;
} }
adsi->dwDriver = (DWORD)apd; adsi->dwDriver = (DWORD_PTR)apd;
adsi->fdwDriver = 0; adsi->fdwDriver = 0;
if (adsi->pwfxSrc->wBitsPerSample == 16) idx += 8; if (adsi->pwfxSrc->wBitsPerSample == 16) idx += 8;
......
...@@ -330,7 +330,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, ...@@ -330,7 +330,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
padsh->pbPreparedDst = 0; padsh->pbPreparedDst = 0;
padsh->cbPreparedDstLength = 0; padsh->cbPreparedDstLength = 0;
ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh); ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (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); padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);
......
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