Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bb55f47e
Commit
bb55f47e
authored
Dec 17, 2012
by
Andrew Talbot
Committed by
Alexandre Julliard
Dec 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32: Indentation fix.
parent
4c191378
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
57 deletions
+54
-57
format.c
dlls/msacm32/format.c
+54
-57
No files found.
dlls/msacm32/format.c
View file @
bb55f47e
...
...
@@ -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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment