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
54ed994a
Commit
54ed994a
authored
Sep 05, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Return DMUS_E_SYNTHNOTCONFIGURED when sink fails to activate.
parent
f6deca59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
synth.c
dlls/dmsynth/synth.c
+9
-6
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+4
-4
No files found.
dlls/dmsynth/synth.c
View file @
54ed994a
...
...
@@ -425,13 +425,16 @@ static HRESULT WINAPI synth_Activate(IDirectMusicSynth8 *iface, BOOL enable)
if
(
enable
==
This
->
active
)
return
S_FALSE
;
if
(
!
This
->
sink
)
return
DMUS_E_NOSYNTHSINK
;
{
This
->
active
=
FALSE
;
return
enable
?
DMUS_E_NOSYNTHSINK
:
DMUS_E_SYNTHNOTCONFIGURED
;
}
if
(
(
hr
=
IDirectMusicSynthSink_Activate
(
This
->
sink
,
enable
))
!=
S_OK
)
{
if
(
hr
==
DMUS_E_SYNTHACTIVE
||
hr
==
S_FALS
E
)
WARN
(
"Synth and sink active state out of sync. Fixing.
\n
"
);
else
return
hr
;
if
(
FAILED
(
hr
=
IDirectMusicSynthSink_Activate
(
This
->
sink
,
enable
))
&&
hr
!=
DMUS_E_SYNTHACTIV
E
)
{
This
->
active
=
FALSE
;
return
DMUS_E_SYNTHNOTCONFIGURED
;
}
This
->
active
=
enable
;
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
54ed994a
...
...
@@ -1016,7 +1016,7 @@ static void test_IDirectMusicSynth(void)
ref
=
get_refcount
(
sink
);
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
hr
=
IDirectMusicSynth_Activate
(
synth
,
TRUE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
/* SetMasterClock does nothing */
hr
=
IDirectMusicSynth_SetMasterClock
(
synth
,
NULL
);
...
...
@@ -1047,9 +1047,9 @@ static void test_IDirectMusicSynth(void)
/* but Activate might fail then */
hr
=
IDirectMusicSynth_Activate
(
synth
,
FALSE
);
todo_wine
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_E_SYNTHNOTCONFIGURED
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicSynth_Activate
(
synth
,
FALSE
);
todo_wine
ok
(
hr
==
S_FALSE
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got %#lx
\n
"
,
hr
);
/* Test generating some samples */
...
...
@@ -1064,7 +1064,7 @@ static void test_IDirectMusicSynth(void)
ref
=
get_refcount
(
sink
);
ok
(
ref
==
2
,
"got %lu
\n
"
,
ref
);
hr
=
IDirectMusicSynth_Activate
(
synth
,
TRUE
);
todo_wine
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
GetTempPathW
(
MAX_PATH
,
temp_path
);
GetTempFileNameW
(
temp_path
,
L"synth"
,
0
,
temp_file
);
...
...
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