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
6ad54620
Commit
6ad54620
authored
Jan 22, 2013
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Allow more margin in the test_asyncWAVE() playback check.
parent
cb3815ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
mci.c
dlls/winmm/tests/mci.c
+13
-8
No files found.
dlls/winmm/tests/mci.c
View file @
6ad54620
...
...
@@ -964,10 +964,7 @@ static void test_asyncWAVE(HWND hwnd)
err
=
mciSendString
(
"play mysound notify"
,
NULL
,
0
,
hwnd
);
ok
(
!
err
,
"mci play returned %s
\n
"
,
dbg_mcierr
(
err
));
/* Give Wine's asynchronous thread time to start up. Furthermore,
* it uses 3 buffers per second, so that the positions reported
* will be 333ms, 667ms etc. at best. */
Sleep
(
100
);
/* milliseconds */
Sleep
(
500
);
/* milliseconds */
/* Do not query time format as string because result depends on locale! */
parm
.
status
.
dwItem
=
MCI_STATUS_TIME_FORMAT
;
...
...
@@ -981,11 +978,19 @@ static void test_asyncWAVE(HWND hwnd)
err
=
mciSendString
(
"status mysound position"
,
buf
,
sizeof
(
buf
),
hwnd
);
ok
(
!
err
,
"mci status position returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
strcmp
(
buf
,
"2000"
),
"mci status position: %s, expected 2000
\n
"
,
buf
);
trace
(
"position after Sleep: %sms
\n
"
,
buf
);
trace
(
"position after Sleep: %sms
\n
"
,
buf
);
p2
=
atoi
(
buf
);
/* Some machines reach 79ms only during the 100ms sleep. */
ok
(
p2
>=
67
,
"not enough time elapsed %ums
\n
"
,
p2
);
/* Check that the 2s sound plays at a normal pace, giving a wide margin to
* account for timing granularity and small delays.
*/
todo_wine
ok
(
400
<=
p2
&&
p2
<=
600
,
"%ums is not in the expected 400-600ms range
\n
"
,
p2
);
/* Wine's asynchronous thread needs some time to start up. Furthermore, it
* uses 3 buffers per second, so that the positions reported will be 333ms,
* 667ms etc. at best, which is why it fails the above test. So add a
* second test specifically to prevent Wine from getting even worse.
* FIXME: To be removed when Wine is fixed and passes the above test.
*/
ok
(
400
<=
p2
&&
p2
<=
1000
,
"%ums is not even in the expected 400-1000ms range
\n
"
,
p2
);
test_notification
(
hwnd
,
"play (nowait)"
,
0
);
err
=
mciSendString
(
"pause mysound wait"
,
NULL
,
0
,
hwnd
);
...
...
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