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
bc479f2a
Commit
bc479f2a
authored
Jul 14, 2023
by
Shaun Ren
Committed by
Alexandre Julliard
Jul 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi/tests: Fix intermittent duration test failure in mmaudio.
parent
9941a716
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mmaudio.c
dlls/sapi/tests/mmaudio.c
+6
-4
No files found.
dlls/sapi/tests/mmaudio.c
View file @
bc479f2a
...
...
@@ -167,7 +167,7 @@ static void test_audio_out(void)
UINT
devid
;
char
*
buf
=
NULL
;
ULONG
written
;
DWORD
start
,
end
;
DWORD
start
,
duration
;
HANDLE
event
=
NULL
;
HRESULT
hr
;
...
...
@@ -256,6 +256,7 @@ static void test_audio_out(void)
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
written
=
0xdeadbeef
;
start
=
GetTickCount
();
hr
=
ISpMMSysAudio_Write
(
mmaudio
,
buf
,
wfx
->
nAvgBytesPerSec
*
200
/
1000
,
&
written
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
written
==
wfx
->
nAvgBytesPerSec
*
200
/
1000
,
"got %lu.
\n
"
,
written
);
...
...
@@ -263,7 +264,8 @@ static void test_audio_out(void)
hr
=
ISpMMSysAudio_Write
(
mmaudio
,
buf
,
wfx
->
nAvgBytesPerSec
*
200
/
1000
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
start
=
GetTickCount
();
hr
=
ISpMMSysAudio_Commit
(
mmaudio
,
STGC_DEFAULT
);
todo_wine
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
event
=
ISpMMSysAudio_EventHandle
(
mmaudio
);
ok
(
event
!=
NULL
,
"event == NULL.
\n
"
);
...
...
@@ -271,8 +273,8 @@ static void test_audio_out(void)
hr
=
WaitForSingleObject
(
event
,
1000
);
ok
(
hr
==
WAIT_OBJECT_0
,
"got %#lx.
\n
"
,
hr
);
end
=
GetTickCount
()
;
ok
(
end
-
start
<=
500
,
"waited for %lu ms.
\n
"
,
end
-
start
);
duration
=
GetTickCount
()
-
start
;
ok
(
duration
>
200
&&
duration
<
800
,
"took %lu ms.
\n
"
,
duration
);
hr
=
ISpMMSysAudio_SetState
(
mmaudio
,
SPAS_CLOSED
,
0
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
...
...
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