mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
msacm32: Indentation fix.
This commit is contained in:
parent
4c191378e9
commit
bb55f47e41
1 changed files with 54 additions and 57 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue