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
b3ec5bc7
Commit
b3ec5bc7
authored
Feb 20, 2024
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Feb 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound/tests: Test that formats with more than two channels require WAVEFORMATEXTENSIBLE.
parent
89e3be4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
dsound.c
dlls/dsound/tests/dsound.c
+45
-0
No files found.
dlls/dsound/tests/dsound.c
View file @
b3ec5bc7
...
...
@@ -1481,6 +1481,51 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I
fmtex
.
SubFormat
=
KSDATAFORMAT_SUBTYPE_PCM
;
rc
=
do_invalid_fmt_test
(
dso
,
buf
,
(
WAVEFORMATEX
*
)
&
fmtex
,
&
got_buf
);
ok
(
rc
==
E_INVALIDARG
,
"%s: SetFormat: %08lx
\n
"
,
testname
,
rc
);
/* The following 4 tests show that formats with more than two channels require WAVEFORMATEXTENSIBLE */
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
wfx
.
nChannels
=
2
;
wfx
.
nSamplesPerSec
=
44100
;
wfx
.
wBitsPerSample
=
16
;
wfx
.
nBlockAlign
=
wfx
.
nChannels
*
wfx
.
wBitsPerSample
/
8
;
wfx
.
nAvgBytesPerSec
=
wfx
.
nSamplesPerSec
*
wfx
.
nBlockAlign
;
rc
=
do_invalid_fmt_test
(
dso
,
buf
,
&
wfx
,
&
got_buf
);
ok
(
rc
==
S_OK
,
"%s: SetFormat: %08lx
\n
"
,
testname
,
rc
);
IDirectSoundBuffer_Release
(
got_buf
);
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
wfx
.
nChannels
=
4
;
wfx
.
nSamplesPerSec
=
44100
;
wfx
.
wBitsPerSample
=
16
;
wfx
.
nBlockAlign
=
wfx
.
nChannels
*
wfx
.
wBitsPerSample
/
8
;
wfx
.
nAvgBytesPerSec
=
wfx
.
nSamplesPerSec
*
wfx
.
nBlockAlign
;
rc
=
do_invalid_fmt_test
(
dso
,
buf
,
&
wfx
,
&
got_buf
);
todo_wine
ok
(
rc
==
(
buf
?
DSERR_ALLOCATED
:
DSERR_INVALIDPARAM
),
"%s: SetFormat: %08lx
\n
"
,
testname
,
rc
);
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
wfx
.
nChannels
=
6
;
wfx
.
nSamplesPerSec
=
44100
;
wfx
.
wBitsPerSample
=
16
;
wfx
.
nBlockAlign
=
wfx
.
nChannels
*
wfx
.
wBitsPerSample
/
8
;
wfx
.
nAvgBytesPerSec
=
wfx
.
nSamplesPerSec
*
wfx
.
nBlockAlign
;
rc
=
do_invalid_fmt_test
(
dso
,
buf
,
&
wfx
,
&
got_buf
);
todo_wine
ok
(
rc
==
(
buf
?
DSERR_ALLOCATED
:
DSERR_INVALIDPARAM
),
"%s: SetFormat: %08lx
\n
"
,
testname
,
rc
);
fmtex
.
Format
.
cbSize
=
sizeof
(
WAVEFORMATEXTENSIBLE
)
-
sizeof
(
WAVEFORMATEX
);
fmtex
.
Format
.
wFormatTag
=
WAVE_FORMAT_EXTENSIBLE
;
fmtex
.
Format
.
nChannels
=
6
;
fmtex
.
Format
.
nSamplesPerSec
=
44100
;
fmtex
.
Format
.
wBitsPerSample
=
16
;
fmtex
.
Format
.
nBlockAlign
=
fmtex
.
Format
.
nChannels
*
fmtex
.
Format
.
wBitsPerSample
/
8
;
fmtex
.
Format
.
nAvgBytesPerSec
=
fmtex
.
Format
.
nSamplesPerSec
*
fmtex
.
Format
.
nBlockAlign
;
fmtex
.
Samples
.
wValidBitsPerSample
=
fmtex
.
Format
.
wBitsPerSample
;
fmtex
.
dwChannelMask
=
KSAUDIO_SPEAKER_5POINT1
;
fmtex
.
SubFormat
=
KSDATAFORMAT_SUBTYPE_PCM
;
rc
=
do_invalid_fmt_test
(
dso
,
buf
,
(
WAVEFORMATEX
*
)
&
fmtex
,
&
got_buf
);
ok
(
rc
==
S_OK
,
"%s: SetFormat: %08lx
\n
"
,
testname
,
rc
);
IDirectSoundBuffer_Release
(
got_buf
);
}
static
HRESULT
test_invalid_fmts
(
LPGUID
lpGuid
)
...
...
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