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
ad75d9a2
Commit
ad75d9a2
authored
Oct 06, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Oct 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Correct (IMA)ADPCM test.
parent
4781e055
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
wave.c
dlls/winmm/tests/wave.c
+16
-14
No files found.
dlls/winmm/tests/wave.c
View file @
ad75d9a2
...
...
@@ -825,6 +825,7 @@ static void wave_out_test_device(UINT_PTR device)
WAVEOUTCAPSW
capsW
;
WAVEFORMATEX
format
,
oformat
;
WAVEFORMATEXTENSIBLE
wfex
;
IMAADPCMWAVEFORMAT
wfa
;
HWAVEOUT
wout
;
MMRESULT
rc
;
UINT
f
;
...
...
@@ -1159,7 +1160,6 @@ static void wave_out_test_device(UINT_PTR device)
format
.
nBlockAlign
=
format
.
nChannels
*
format
.
wBitsPerSample
/
8
;
format
.
nAvgBytesPerSec
=
format
.
nSamplesPerSec
*
format
.
nBlockAlign
;
format
.
cbSize
=
0
;
oformat
=
format
;
rc
=
waveOutOpen
(
&
wout
,
device
,
&
format
,
0
,
0
,
CALLBACK_NULL
|
WAVE_FORMAT_DIRECT
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_INVALFLAG
||
rc
==
MMSYSERR_INVALPARAM
,
...
...
@@ -1176,28 +1176,30 @@ static void wave_out_test_device(UINT_PTR device)
trace
(
"waveOutOpen(%s): WAVE_FORMAT_MULAW not supported
\n
"
,
dev_name
(
device
));
format
.
wFormatTag
=
WAVE_FORMAT
_ADPCM
;
format
.
nChannels
=
2
;
format
.
wBitsPerSample
=
4
;
format
.
nSamplesPerSec
=
22050
;
format
.
nBlockAlign
=
format
.
nChannels
*
format
.
wBitsPerSample
/
8
;
format
.
nAvgBytesPerSec
=
format
.
nSamplesPerSec
*
format
.
nBlockAlign
;
format
.
cbSize
=
0
;
oformat
=
format
;
rc
=
waveOutOpen
(
&
wout
,
device
,
&
format
,
0
,
0
,
CALLBACK_NULL
|
WAVE_FORMAT_DIRECT
);
wfa
.
wfx
.
wFormatTag
=
WAVE_FORMAT_IMA
_ADPCM
;
wfa
.
wfx
.
nChannels
=
1
;
wfa
.
wfx
.
nSamplesPerSec
=
11025
;
wfa
.
wfx
.
nAvgBytesPerSec
=
5588
;
wfa
.
wfx
.
nBlockAlign
=
256
;
wfa
.
wfx
.
wBitsPerSample
=
4
;
/* see imaadp32.c */
wfa
.
wfx
.
cbSize
=
2
;
wfa
.
wSamplesPerBlock
=
505
;
rc
=
waveOutOpen
(
&
wout
,
device
,
&
wfa
.
wfx
,
0
,
0
,
CALLBACK_NULL
|
WAVE_FORMAT_DIRECT
);
ok
(
rc
==
MMSYSERR_NOERROR
||
rc
==
WAVERR_BADFORMAT
||
rc
==
MMSYSERR_INVALFLAG
||
rc
==
MMSYSERR_INVALPARAM
,
"waveOutOpen(%s): returned %s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
(
rc
==
MMSYSERR_NOERROR
)
{
waveOutClose
(
wout
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
0
,
CALLBACK_EVENT
,
/* TODO: teach wave_generate_* ADPCM
wave_out_test_deviceOut(device,1.0,1,0,&wfa.wfx,0,CALLBACK_EVENT,
&capsA,winetest_interactive,TRUE,FALSE);
wave_out_test_deviceOut
(
device
,
1
.
0
,
10
,
0
,
&
format
,
0
,
CALLBACK_EVENT
,
wave_out_test_deviceOut(device,1.0,10,0,&
wfa.wfx
,0,CALLBACK_EVENT,
&capsA,winetest_interactive,TRUE,FALSE);
wave_out_test_deviceOut
(
device
,
1
.
0
,
5
,
1
,
&
format
,
0
,
CALLBACK_EVENT
,
wave_out_test_deviceOut(device,1.0,5,1,&
wfa.wfx
,0,CALLBACK_EVENT,
&capsA,winetest_interactive,TRUE,FALSE);
*/
}
else
trace
(
"waveOutOpen(%s): WAVE_FORMAT_ADPCM not supported
\n
"
,
trace
(
"waveOutOpen(%s): WAVE_FORMAT_
IMA_
ADPCM not supported
\n
"
,
dev_name
(
device
));
/* test if WAVEFORMATEXTENSIBLE supported */
...
...
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