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
3a54e89f
Commit
3a54e89f
authored
Mar 10, 2009
by
Stefano Guidoni
Committed by
Alexandre Julliard
Mar 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32: acmFormatEnum: Implement ACM_FORMATENUMF_SUGGEST.
parent
e1413fae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
37 deletions
+80
-37
format.c
dlls/msacm32/format.c
+80
-37
No files found.
dlls/msacm32/format.c
View file @
3a54e89f
...
...
@@ -443,41 +443,85 @@ static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had,
ACMFORMATTAGDETAILSW
aftd
;
unsigned
int
i
,
j
;
for
(
i
=
0
;
i
<
padid
->
cFormatTags
;
i
++
)
{
memset
(
&
aftd
,
0
,
sizeof
(
aftd
));
aftd
.
cbStruct
=
sizeof
(
aftd
);
aftd
.
dwFormatTagIndex
=
i
;
if
(
acmFormatTagDetailsW
(
had
,
&
aftd
,
ACM_FORMATTAGDETAILSF_INDEX
)
!=
MMSYSERR_NOERROR
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_WFORMATTAG
)
&&
aftd
.
dwFormatTag
!=
pwfxRef
->
wFormatTag
)
continue
;
for
(
j
=
0
;
j
<
aftd
.
cStandardFormats
;
j
++
)
{
pafd
->
dwFormatIndex
=
j
;
pafd
->
dwFormatTag
=
aftd
.
dwFormatTag
;
if
(
acmFormatDetailsW
(
had
,
pafd
,
ACM_FORMATDETAILSF_INDEX
)
!=
MMSYSERR_NOERROR
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_NCHANNELS
)
&&
pafd
->
pwfx
->
nChannels
!=
pwfxRef
->
nChannels
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_NSAMPLESPERSEC
)
&&
pafd
->
pwfx
->
nSamplesPerSec
!=
pwfxRef
->
nSamplesPerSec
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_WBITSPERSAMPLE
)
&&
pafd
->
pwfx
->
wBitsPerSample
!=
pwfxRef
->
wBitsPerSample
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_HARDWARE
)
&&
!
(
pafd
->
fdwSupport
&
ACMDRIVERDETAILS_SUPPORTF_HARDWARE
))
continue
;
/* more checks to be done on fdwEnum */
if
(
!
(
fnCallback
)((
HACMDRIVERID
)
padid
,
pafd
,
dwInstance
,
padid
->
fdwSupport
))
return
FALSE
;
}
/* the "formats" used by the filters are also reported */
if
(
fdwEnum
&
ACM_FORMATENUMF_SUGGEST
)
{
HDRVR
hdrvr
;
ACMDRVFORMATSUGGEST
adfs
;
pafd
->
dwFormatIndex
=
0
;
memset
(
&
aftd
,
0
,
sizeof
(
aftd
));
aftd
.
cbStruct
=
sizeof
(
aftd
);
memset
(
&
adfs
,
0
,
sizeof
(
adfs
));
adfs
.
cbStruct
=
sizeof
(
adfs
);
for
(
i
=
0
;
i
<
padid
->
cFormatTags
;
i
++
)
{
aftd
.
dwFormatTag
=
i
;
pafd
->
dwFormatTag
=
aftd
.
dwFormatTag
;
pafd
->
pwfx
->
wFormatTag
=
pafd
->
dwFormatTag
;
if
(
acmFormatTagDetailsW
(
had
,
&
aftd
,
ACM_FORMATTAGDETAILSF_INDEX
)
!=
MMSYSERR_NOERROR
)
continue
;
adfs
.
cbwfxSrc
=
aftd
.
cbFormatSize
;
adfs
.
cbwfxDst
=
aftd
.
cbFormatSize
;
adfs
.
pwfxSrc
=
pwfxRef
;
adfs
.
pwfxDst
=
pafd
->
pwfx
;
pafd
->
fdwSupport
=
padid
->
fdwSupport
;
if
((
fdwEnum
&
ACM_FORMATENUMF_WFORMATTAG
)
&&
aftd
.
dwFormatTag
!=
pwfxRef
->
wFormatTag
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_HARDWARE
)
&&
!
(
pafd
->
fdwSupport
&
ACMDRIVERDETAILS_SUPPORTF_HARDWARE
))
continue
;
hdrvr
=
OpenDriver
(
padid
->
pszFileName
,
0
,
0
);
SendDriverMessage
(
hdrvr
,
ACMDM_FORMAT_SUGGEST
,(
DWORD
)
&
adfs
,(
fdwEnum
&
0x000000FFL
));
if
(
acmFormatDetailsW
(
had
,
pafd
,
ACM_FORMATDETAILSF_FORMAT
)
!=
MMSYSERR_NOERROR
)
continue
;
pafd
->
cbwfx
=
sizeof
(
*
(
pafd
->
pwfx
));
if
(
!
(
fnCallback
)((
HACMDRIVERID
)
padid
,
pafd
,
dwInstance
,
padid
->
fdwSupport
))
return
FALSE
;
}
}
else
{
for
(
i
=
0
;
i
<
padid
->
cFormatTags
;
i
++
)
{
memset
(
&
aftd
,
0
,
sizeof
(
aftd
));
aftd
.
cbStruct
=
sizeof
(
aftd
);
aftd
.
dwFormatTagIndex
=
i
;
if
(
acmFormatTagDetailsW
(
had
,
&
aftd
,
ACM_FORMATTAGDETAILSF_INDEX
)
!=
MMSYSERR_NOERROR
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_WFORMATTAG
)
&&
aftd
.
dwFormatTag
!=
pwfxRef
->
wFormatTag
)
continue
;
for
(
j
=
0
;
j
<
aftd
.
cStandardFormats
;
j
++
)
{
pafd
->
dwFormatIndex
=
j
;
pafd
->
dwFormatTag
=
aftd
.
dwFormatTag
;
if
(
acmFormatDetailsW
(
had
,
pafd
,
ACM_FORMATDETAILSF_INDEX
)
!=
MMSYSERR_NOERROR
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_NCHANNELS
)
&&
pafd
->
pwfx
->
nChannels
!=
pwfxRef
->
nChannels
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_NSAMPLESPERSEC
)
&&
pafd
->
pwfx
->
nSamplesPerSec
!=
pwfxRef
->
nSamplesPerSec
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_WBITSPERSAMPLE
)
&&
pafd
->
pwfx
->
wBitsPerSample
!=
pwfxRef
->
wBitsPerSample
)
continue
;
if
((
fdwEnum
&
ACM_FORMATENUMF_HARDWARE
)
&&
!
(
pafd
->
fdwSupport
&
ACMDRIVERDETAILS_SUPPORTF_HARDWARE
))
continue
;
/* more checks to be done on fdwEnum */
if
(
!
(
fnCallback
)((
HACMDRIVERID
)
padid
,
pafd
,
dwInstance
,
padid
->
fdwSupport
))
return
FALSE
;
}
/* the "formats" used by the filters are also reported */
}
}
return
TRUE
;
}
...
...
@@ -514,8 +558,7 @@ MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, PACMFORMATDETAILSW pafd,
(
pafd
->
dwFormatTag
!=
pafd
->
pwfx
->
wFormatTag
))
return
MMSYSERR_INVALPARAM
;
if
(
fdwEnum
&
(
ACM_FORMATENUMF_CONVERT
|
ACM_FORMATENUMF_SUGGEST
|
ACM_FORMATENUMF_INPUT
|
ACM_FORMATENUMF_OUTPUT
))
if
(
fdwEnum
&
(
ACM_FORMATENUMF_CONVERT
|
ACM_FORMATENUMF_INPUT
|
ACM_FORMATENUMF_OUTPUT
))
FIXME
(
"Unsupported fdwEnum values %08x
\n
"
,
fdwEnum
);
if
(
had
)
{
...
...
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