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
7cd77b2a
Commit
7cd77b2a
authored
May 31, 2023
by
Shaun Ren
Committed by
Alexandre Julliard
Jun 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpMMSysAudio::EventHandle.
parent
ef730b6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
mmaudio.c
dlls/sapi/mmaudio.c
+4
-2
mmaudio.c
dlls/sapi/tests/mmaudio.c
+16
-0
No files found.
dlls/sapi/mmaudio.c
View file @
7cd77b2a
...
...
@@ -728,9 +728,11 @@ static HRESULT WINAPI mmsysaudio_GetDefaultFormat(ISpMMSysAudio *iface, GUID *gu
static
HANDLE
WINAPI
mmsysaudio_EventHandle
(
ISpMMSysAudio
*
iface
)
{
FIXME
(
"(%p): stub.
\n
"
,
iface
);
struct
mmaudio
*
This
=
impl_from_ISpMMSysAudio
(
iface
);
return
NULL
;
TRACE
(
"(%p).
\n
"
,
iface
);
return
This
->
event
;
}
static
HRESULT
WINAPI
mmsysaudio_GetVolumeLevel
(
ISpMMSysAudio
*
iface
,
ULONG
*
level
)
...
...
dlls/sapi/tests/mmaudio.c
View file @
7cd77b2a
...
...
@@ -167,6 +167,8 @@ static void test_audio_out(void)
UINT
devid
;
char
*
buf
=
NULL
;
ULONG
written
;
DWORD
start
,
end
;
HANDLE
event
=
NULL
;
HRESULT
hr
;
if
(
waveOutGetNumDevs
()
==
0
)
{
...
...
@@ -258,6 +260,20 @@ static void test_audio_out(void)
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
written
==
wfx
->
nAvgBytesPerSec
*
200
/
1000
,
"got %lu.
\n
"
,
written
);
hr
=
ISpMMSysAudio_Write
(
mmaudio
,
buf
,
wfx
->
nAvgBytesPerSec
*
200
/
1000
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
start
=
GetTickCount
();
event
=
ISpMMSysAudio_EventHandle
(
mmaudio
);
ok
(
event
!=
NULL
,
"event == NULL.
\n
"
);
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
);
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