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
c6afba89
Commit
c6afba89
authored
Sep 09, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32: Quit on unsupported destination format in PCM_FormatSuggest.
parent
af8760e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
pcmconverter.c
dlls/msacm32/pcmconverter.c
+13
-8
msacm.c
dlls/msacm32/tests/msacm.c
+0
-1
No files found.
dlls/msacm32/pcmconverter.c
View file @
c6afba89
...
...
@@ -839,28 +839,33 @@ static LRESULT PCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
/* some tests ... */
if
(
adfs
->
cbwfxSrc
<
sizeof
(
PCMWAVEFORMAT
)
||
adfs
->
cbwfxDst
<
sizeof
(
PCMWAVEFORMAT
)
||
PCM_GetFormatIndex
(
adfs
->
pwfxSrc
)
==
0xFFFFFFFF
)
{
adfs
->
cbwfxDst
<
sizeof
(
PCMWAVEFORMAT
)
||
PCM_GetFormatIndex
(
adfs
->
pwfxSrc
)
==
0xFFFFFFFF
)
{
WARN
(
"not possible
\n
"
);
return
ACMERR_NOTPOSSIBLE
;
}
/* is no suggestion for destination, then copy source value */
if
(
!
(
adfs
->
fdwSuggest
&
ACM_FORMATSUGGESTF_NCHANNELS
))
{
adfs
->
pwfxDst
->
nChannels
=
adfs
->
pwfxSrc
->
nChannels
;
adfs
->
pwfxDst
->
nChannels
=
adfs
->
pwfxSrc
->
nChannels
;
}
if
(
!
(
adfs
->
fdwSuggest
&
ACM_FORMATSUGGESTF_NSAMPLESPERSEC
))
{
adfs
->
pwfxDst
->
nSamplesPerSec
=
adfs
->
pwfxSrc
->
nSamplesPerSec
;
adfs
->
pwfxDst
->
nSamplesPerSec
=
adfs
->
pwfxSrc
->
nSamplesPerSec
;
}
if
(
!
(
adfs
->
fdwSuggest
&
ACM_FORMATSUGGESTF_WBITSPERSAMPLE
))
{
adfs
->
pwfxDst
->
wBitsPerSample
=
adfs
->
pwfxSrc
->
wBitsPerSample
;
adfs
->
pwfxDst
->
wBitsPerSample
=
adfs
->
pwfxSrc
->
wBitsPerSample
;
}
if
(
!
(
adfs
->
fdwSuggest
&
ACM_FORMATSUGGESTF_WFORMATTAG
))
{
if
(
adfs
->
pwfxSrc
->
wFormatTag
!=
WAVE_FORMAT_PCM
)
{
WARN
(
"not possible
\n
"
);
if
(
adfs
->
pwfxSrc
->
wFormatTag
!=
WAVE_FORMAT_PCM
)
{
WARN
(
"source format 0x%x not supported
\n
"
,
adfs
->
pwfxSrc
->
wFormatTag
);
return
ACMERR_NOTPOSSIBLE
;
}
adfs
->
pwfxDst
->
wFormatTag
=
adfs
->
pwfxSrc
->
wFormatTag
;
}
else
{
if
(
adfs
->
pwfxDst
->
wFormatTag
!=
WAVE_FORMAT_PCM
)
{
WARN
(
"destination format 0x%x not supported
\n
"
,
adfs
->
pwfxDst
->
wFormatTag
);
return
ACMERR_NOTPOSSIBLE
;
}
adfs
->
pwfxDst
->
wFormatTag
=
adfs
->
pwfxSrc
->
wFormatTag
;
}
/* check if result is ok */
if
(
PCM_GetFormatIndex
(
adfs
->
pwfxDst
)
==
0xFFFFFFFF
)
{
...
...
dlls/msacm32/tests/msacm.c
View file @
c6afba89
...
...
@@ -652,7 +652,6 @@ todo_wine
|
ACM_FORMATSUGGESTF_WBITSPERSAMPLE
|
ACM_FORMATSUGGESTF_WFORMATTAG
;
rc
=
acmFormatSuggest
(
NULL
,
&
src
,
&
dst
,
sizeof
(
dst
),
suggest
);
todo_wine
ok
(
rc
==
ACMERR_NOTPOSSIBLE
,
"failed with error 0x%x
\n
"
,
rc
);
memset
(
&
dst
,
0
,
sizeof
(
dst
));
suggest
=
0
;
...
...
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