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
722262b0
Commit
722262b0
authored
Aug 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Forward IDirectMusicSynth_GetLatencyClock to the sink.
parent
2a1b03cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
24 deletions
+7
-24
synth.c
dlls/dmsynth/synth.c
+4
-21
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+3
-3
No files found.
dlls/dmsynth/synth.c
View file @
722262b0
...
...
@@ -38,7 +38,6 @@ struct synth
DMUS_PORTPARAMS
params
;
BOOL
active
;
BOOL
open
;
IReferenceClock
*
latency_clock
;
IDirectMusicSynthSink
*
sink
;
};
...
...
@@ -93,11 +92,7 @@ static ULONG WINAPI synth_Release(IDirectMusicSynth8 *iface)
TRACE
(
"(%p): new ref = %lu
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
latency_clock
)
IReferenceClock_Release
(
This
->
latency_clock
);
free
(
This
);
}
if
(
!
ref
)
free
(
This
);
return
ref
;
}
...
...
@@ -414,14 +409,10 @@ static HRESULT WINAPI synth_GetLatencyClock(IDirectMusicSynth8 *iface,
if
(
!
clock
)
return
E_POINTER
;
if
(
!
This
->
sink
)
return
DMUS_E_NOSYNTHSINK
;
*
clock
=
This
->
latency_clock
;
IReferenceClock_AddRef
(
This
->
latency_clock
);
return
S_OK
;
return
IDirectMusicSynthSink_GetLatencyClock
(
This
->
sink
,
clock
);
}
static
HRESULT
WINAPI
synth_Activate
(
IDirectMusicSynth8
*
iface
,
BOOL
enable
)
...
...
@@ -457,28 +448,20 @@ static HRESULT WINAPI synth_SetSynthSink(IDirectMusicSynth8 *iface,
IDirectMusicSynthSink
*
sink
)
{
struct
synth
*
This
=
impl_from_IDirectMusicSynth8
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
sink
);
if
(
sink
==
This
->
sink
)
return
S_OK
;
if
(
!
sink
||
This
->
sink
)
{
/* Disconnect the sink */
if
(
This
->
latency_clock
)
IReferenceClock_Release
(
This
->
latency_clock
);
IDirectMusicSynthSink_Release
(
This
->
sink
);
}
if
(
!
sink
||
This
->
sink
)
IDirectMusicSynthSink_Release
(
This
->
sink
);
This
->
sink
=
sink
;
if
(
!
sink
)
return
S_OK
;
IDirectMusicSynthSink_AddRef
(
This
->
sink
);
if
(
FAILED
(
hr
=
IDirectMusicSynthSink_Init
(
sink
,
(
IDirectMusicSynth
*
)
iface
)))
return
hr
;
return
IDirectMusicSynthSink_GetLatencyClock
(
sink
,
&
This
->
latency_clock
);
return
IDirectMusicSynthSink_Init
(
sink
,
(
IDirectMusicSynth
*
)
iface
);
}
static
HRESULT
WINAPI
synth_Render
(
IDirectMusicSynth8
*
iface
,
short
*
buffer
,
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
722262b0
...
...
@@ -1014,7 +1014,7 @@ static void test_IDirectMusicSynth(void)
hr
=
IDirectMusicSynth_SetSynthSink
(
synth
,
sink
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ref
=
get_refcount
(
sink
);
todo_wine
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
hr
=
IDirectMusicSynth_Activate
(
synth
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1062,7 +1062,7 @@ static void test_IDirectMusicSynth(void)
hr
=
IDirectMusicSynth_SetSynthSink
(
synth
,
sink
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ref
=
get_refcount
(
sink
);
todo_wine
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
hr
=
IDirectMusicSynth_Activate
(
synth
,
TRUE
);
todo_wine
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1145,7 +1145,7 @@ static void test_IDirectMusicSynth(void)
IDirectMusicSynth_Release
(
synth
);
if
(
strcmp
(
winetest_platform
,
"wine"
))
IDirectMusicSynthSink_Release
(
sink
);
IDirectMusicSynthSink_Release
(
sink
);
IReferenceClock_Release
(
clock
);
IDirectMusic_Release
(
music
);
}
...
...
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