Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
32c23cbc
Commit
32c23cbc
authored
Jan 18, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Properly recover from the WAVERR_STILLPLAYING case.
parent
47827384
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
12 deletions
+31
-12
wave.c
dlls/winmm/tests/wave.c
+31
-12
No files found.
dlls/winmm/tests/wave.c
View file @
32c23cbc
...
...
@@ -684,7 +684,8 @@ static void wave_out_test_deviceOut(int device, double duration,
if
(
rc
!=
MMSYSERR_NOERROR
)
goto
EXIT
;
WaitForSingleObject
(
hevent
,
10000
);
rc
=
WaitForSingleObject
(
hevent
,
9000
);
ok
(
rc
==
WAIT_OBJECT_0
,
"missing WOM_OPEN notification
\n
"
);
ok
(
pwfx
->
nChannels
==
nChannels
&&
pwfx
->
wBitsPerSample
==
wBitsPerSample
&&
...
...
@@ -787,7 +788,8 @@ static void wave_out_test_deviceOut(int device, double duration,
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutWrite(%s, header[%d]): rc=%s
\n
"
,
dev_name
(
device
),(
i
+
1
)
%
headers
,
wave_out_error
(
rc
));
}
WaitForSingleObject
(
hevent
,
10000
);
rc
=
WaitForSingleObject
(
hevent
,
8000
);
ok
(
rc
==
WAIT_OBJECT_0
,
"missing WOM_DONE notification
\n
"
);
}
}
...
...
@@ -807,12 +809,29 @@ static void wave_out_test_deviceOut(int device, double duration,
"waveOutUnprepareHeader(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
rc
=
waveOutClose
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutClose(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
WaitForSingleObject
(
hevent
,
10000
);
if
(
rc
==
WAVERR_STILLPLAYING
)
{
/* waveOutReset ought to return all buffers s.t. waveOutClose succeeds */
rc
=
waveOutReset
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutReset(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
for
(
i
=
0
;
i
<
headers
;
i
++
)
{
rc
=
waveOutUnprepareHeader
(
wout
,
&
frags
[
i
],
sizeof
(
frags
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutUnprepareHeader(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
rc
=
waveOutClose
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutClose(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
rc
=
WaitForSingleObject
(
hevent
,
1500
);
ok
(
rc
==
WAIT_OBJECT_0
,
"missing WOM_CLOSE notification
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
EXIT:
if
((
flags
&
CALLBACK_TYPEMASK
)
==
CALLBACK_THREAD
)
{
PostThreadMessage
(
thread_id
,
WM_APP
,
0
,
0
);
...
...
@@ -970,20 +989,20 @@ 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
;
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_EVENT
,
&
capsA
,
TRUE
,
FALSE
,
FALSE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_EVENT
,
&
capsA
,
TRUE
,
FALSE
,
TRUE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_FUNCTION
,
&
capsA
,
TRUE
,
FALSE
,
FALSE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_FUNCTION
,
&
capsA
,
TRUE
,
FALSE
,
TRUE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_THREAD
,
&
capsA
,
TRUE
,
FALSE
,
FALSE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
6
,
1
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_THREAD
,
&
capsA
,
TRUE
,
FALSE
,
TRUE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
10
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
wave_out_test_deviceOut
(
device
,
0
.
8
,
10
,
0
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_EVENT
,
&
capsA
,
TRUE
,
FALSE
,
FALSE
);
wave_out_test_deviceOut
(
device
,
1
.
0
,
5
,
1
,
&
format
,
WAVE_FORMAT_2M08
,
CALLBACK_EVENT
,
&
capsA
,
TRUE
,
FALSE
,
FALSE
);
...
...
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