Commit bb55f47e authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

msacm32: Indentation fix.

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