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
10da838a
Commit
10da838a
authored
Aug 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Implement IDirectMusicSynthSink_Activate semi-stub.
parent
1b3cc0ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
synthsink.c
dlls/dmsynth/synthsink.c
+25
-2
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+7
-7
No files found.
dlls/dmsynth/synthsink.c
View file @
10da838a
...
...
@@ -35,7 +35,9 @@ struct synth_sink
IReferenceClock
*
master_clock
;
IDirectMusicSynth
*
synth
;
/* No reference hold! */
IDirectSound
*
dsound
;
BOOL
active
;
REFERENCE_TIME
activate_time
;
};
static
inline
struct
synth_sink
*
impl_from_IDirectMusicSynthSink
(
IDirectMusicSynthSink
*
iface
)
...
...
@@ -43,6 +45,27 @@ static inline struct synth_sink *impl_from_IDirectMusicSynthSink(IDirectMusicSyn
return
CONTAINING_RECORD
(
iface
,
struct
synth_sink
,
IDirectMusicSynthSink_iface
);
}
static
HRESULT
synth_sink_activate
(
struct
synth_sink
*
This
)
{
HRESULT
hr
;
if
(
!
This
->
synth
)
return
DMUS_E_SYNTHNOTCONFIGURED
;
if
(
!
This
->
dsound
)
return
DMUS_E_DSOUND_NOT_SET
;
if
(
!
This
->
master_clock
)
return
DMUS_E_NO_MASTER_CLOCK
;
if
(
This
->
active
)
return
DMUS_E_SYNTHACTIVE
;
if
(
FAILED
(
hr
=
IReferenceClock_GetTime
(
This
->
master_clock
,
&
This
->
activate_time
)))
return
hr
;
This
->
active
=
TRUE
;
return
S_OK
;
}
static
HRESULT
synth_sink_deactivate
(
struct
synth_sink
*
This
)
{
This
->
active
=
FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
synth_sink_QueryInterface
(
IDirectMusicSynthSink
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
...
...
@@ -151,9 +174,9 @@ static HRESULT WINAPI synth_sink_Activate(IDirectMusicSynthSink *iface,
{
struct
synth_sink
*
This
=
impl_from_IDirectMusicSynthSink
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
enable
);
FIXME
(
"(%p)->(%d): s
emi-s
tub
\n
"
,
This
,
enable
);
return
S_OK
;
return
enable
?
synth_sink_activate
(
This
)
:
synth_sink_deactivate
(
This
)
;
}
static
HRESULT
WINAPI
synth_sink_SampleToRefTime
(
IDirectMusicSynthSink
*
iface
,
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
10da838a
...
...
@@ -1192,7 +1192,7 @@ static void test_IDirectMusicSynthSink(void)
/* sink is not configured */
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
...
...
@@ -1247,11 +1247,11 @@ static void test_IDirectMusicSynthSink(void)
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
size
==
352800
,
"got %lu
\n
"
,
size
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_DSOUND_NOT_SET
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_DSOUND_NOT_SET
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_SetDirectSound
(
sink
,
dsound
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_NO_MASTER_CLOCK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_NO_MASTER_CLOCK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_SetMasterClock
(
sink
,
clock
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IReferenceClock_GetTime
(
latency_clock
,
&
time
);
...
...
@@ -1259,7 +1259,7 @@ static void test_IDirectMusicSynthSink(void)
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
ref
=
get_refcount
(
synth
);
ok
(
ref
==
1
,
"got %#lx
\n
"
,
ref
);
...
...
@@ -1297,13 +1297,13 @@ static void test_IDirectMusicSynthSink(void)
ref
=
get_refcount
(
synth
);
ok
(
ref
==
1
,
"got %#lx
\n
"
,
ref
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
/* changing dsound while active fails */
hr
=
IDirectMusicSynthSink_SetDirectSound
(
sink
,
dsound
,
NULL
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_SetDirectSound
(
sink
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHACTIVE
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_Activate
(
sink
,
FALSE
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_SetDirectSound
(
sink
,
NULL
,
NULL
);
...
...
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