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
5d687a23
Commit
5d687a23
authored
Jan 19, 2022
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Activate the sink from the synth Activate() method.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3292bc29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
dmsynth_private.h
dlls/dmsynth/dmsynth_private.h
+1
-1
synth.c
dlls/dmsynth/synth.c
+19
-1
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+1
-1
No files found.
dlls/dmsynth/dmsynth_private.h
View file @
5d687a23
...
...
@@ -63,7 +63,7 @@ struct IDirectMusicSynth8Impl {
/* IDirectMusicSynth8 fields */
DMUS_PORTCAPS
pCaps
;
BOOL
fA
ctive
;
BOOL
a
ctive
;
IReferenceClock
*
pLatencyClock
;
IDirectMusicSynthSink
*
sink
;
};
...
...
dlls/dmsynth/synth.c
View file @
5d687a23
...
...
@@ -332,10 +332,28 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(IDirectMusicSynth8
static
HRESULT
WINAPI
IDirectMusicSynth8Impl_Activate
(
IDirectMusicSynth8
*
iface
,
BOOL
enable
)
{
IDirectMusicSynth8Impl
*
This
=
impl_from_IDirectMusicSynth8
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
enable
);
This
->
fActive
=
enable
;
if
(
!
This
->
sink
)
return
DMUS_E_NOSYNTHSINK
;
if
(
enable
==
This
->
active
)
{
if
(
enable
)
return
DMUS_E_SYNTHACTIVE
;
else
return
S_FALSE
;
}
if
((
hr
=
IDirectMusicSynthSink_Activate
(
This
->
sink
,
enable
))
!=
S_OK
)
{
if
(
hr
==
DMUS_E_SYNTHACTIVE
||
hr
==
S_FALSE
)
WARN
(
"Synth and sink active state out of sync. Fixing.
\n
"
);
else
return
hr
;
}
This
->
active
=
enable
;
return
S_OK
;
}
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
5d687a23
...
...
@@ -114,7 +114,7 @@ static void test_dmsynth(void)
/* Synth isn't fully initialized yet */
hr
=
IDirectMusicSynth_Activate
(
dmsynth
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_NOSYNTHSINK
,
"IDirectMusicSynth_Activate returned: %x
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_NOSYNTHSINK
,
"IDirectMusicSynth_Activate returned: %x
\n
"
,
hr
);
/* Synth has no default clock */
hr
=
IDirectMusicSynth_GetLatencyClock
(
dmsynth
,
&
clock_synth
);
...
...
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