msacm32: Indentation fix.

This commit is contained in:
Andrew Talbot 2012-12-17 22:12:11 +00:00 committed by Alexandre Julliard
parent 4c191378e9
commit bb55f47e41

View file

@ -894,12 +894,12 @@ MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
ACMFORMATTAGENUMCBW fnCallback,
DWORD_PTR dwInstance, DWORD fdwEnum)
{
PWINE_ACMDRIVERID padid;
unsigned int i;
BOOL bPcmDone = FALSE;
PWINE_ACMDRIVERID padid;
unsigned int i;
BOOL bPcmDone = FALSE;
TRACE("(%p, %p, %p, %ld, %d)\n",
had, paftd, fnCallback, dwInstance, fdwEnum);
had, paftd, fnCallback, dwInstance, fdwEnum);
if (!paftd)
return MMSYSERR_INVALPARAM;
@ -920,63 +920,60 @@ MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd,
/* if (had) FIXME("had != NULL, not supported\n"); */
if (had) {
if (acmDriverID((HACMOBJ)had, (HACMDRIVERID *)&padid, 0) != MMSYSERR_NOERROR)
return MMSYSERR_INVALHANDLE;
if (acmDriverID((HACMOBJ)had, (HACMDRIVERID *)&padid, 0) != MMSYSERR_NOERROR)
return MMSYSERR_INVALHANDLE;
for (i = 0; i < padid->cFormatTags; i++) {
paftd->dwFormatTagIndex = i;
if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS,
(LPARAM)paftd, ACM_FORMATTAGDETAILSF_INDEX) == MMSYSERR_NOERROR) {
if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
if (paftd->szFormatTag[0] == 0)
MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
/* (WS) I'm preserving this PCM hack since it seems to be
* correct. Please notice this block was borrowed from
* below.
*/
if (bPcmDone) continue;
bPcmDone = TRUE;
}
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport))
return MMSYSERR_NOERROR;
}
}
for (i = 0; i < padid->cFormatTags; i++) {
paftd->dwFormatTagIndex = i;
if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS,
(LPARAM)paftd, ACM_FORMATTAGDETAILSF_INDEX) == MMSYSERR_NOERROR) {
if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
if (paftd->szFormatTag[0] == 0)
MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
/* (WS) I'm preserving this PCM hack since it seems to be
* correct. Please notice this block was borrowed from
* below.
*/
if (bPcmDone) continue;
bPcmDone = TRUE;
}
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport))
return MMSYSERR_NOERROR;
}
}
}
/* if had==0 then search for the first suitable driver */
else {
for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
/* should check for codec only */
if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
for (i = 0; i < padid->cFormatTags; i++) {
paftd->dwFormatTagIndex = i;
if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS,
(LPARAM)paftd, ACM_FORMATTAGDETAILSF_INDEX) == MMSYSERR_NOERROR) {
if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
if (paftd->szFormatTag[0] == 0)
MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
/* FIXME (EPP): I'm not sure this is the correct
* algorithm (should make more sense to apply the same
* for all already loaded formats, but this will do
* for now
*/
if (bPcmDone) continue;
bPcmDone = TRUE;
}
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport)) {
acmDriverClose(had, 0);
return MMSYSERR_NOERROR;
}
}
}
acmDriverClose(had, 0);
}
}
for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) {
/* should check for codec only */
if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) &&
acmDriverOpen(&had, (HACMDRIVERID)padid, 0) == MMSYSERR_NOERROR) {
for (i = 0; i < padid->cFormatTags; i++) {
paftd->dwFormatTagIndex = i;
if (MSACM_Message(had, ACMDM_FORMATTAG_DETAILS,
(LPARAM)paftd, ACM_FORMATTAGDETAILSF_INDEX) == MMSYSERR_NOERROR) {
if (paftd->dwFormatTag == WAVE_FORMAT_PCM) {
if (paftd->szFormatTag[0] == 0)
MultiByteToWideChar( CP_ACP, 0, "PCM", -1, paftd->szFormatTag,
sizeof(paftd->szFormatTag)/sizeof(WCHAR) );
/* FIXME (EPP): I'm not sure this is the correct
* algorithm (should make more sense to apply the same
* for all already loaded formats, but this will do
* for now
*/
if (bPcmDone) continue;
bPcmDone = TRUE;
}
if (!(fnCallback)((HACMDRIVERID)padid, paftd, dwInstance, padid->fdwSupport)) {
acmDriverClose(had, 0);
return MMSYSERR_NOERROR;
}
}
}
acmDriverClose(had, 0);
}
}
}
return MMSYSERR_NOERROR;
}