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
43b3f844
Commit
43b3f844
authored
May 10, 2017
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Add dsound handling to the synth port Activate() method.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f968edb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
port.c
dlls/dmusic/port.c
+21
-3
dmusic.c
dlls/dmusic/tests/dmusic.c
+7
-7
No files found.
dlls/dmusic/port.c
View file @
43b3f844
...
...
@@ -436,11 +436,29 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIREC
return
S_OK
;
}
static
HRESULT
WINAPI
SynthPortImpl_IDirectMusicPort_Activate
(
LPDIRECTMUSICPORT
iface
,
BOOL
active
)
static
HRESULT
WINAPI
synth_dmport_Activate
(
IDirectMusicPort
*
iface
,
BOOL
active
)
{
SynthPortImpl
*
This
=
impl_from_SynthPortImpl_IDirectMusicPort
(
iface
);
TRACE
(
"(%p/%p)->(%d)
\n
"
,
iface
,
This
,
active
);
FIXME
(
"(%p/%p)->(%d): semi-stub
\n
"
,
iface
,
This
,
active
);
if
(
This
->
active
==
active
)
return
S_FALSE
;
if
(
active
)
{
/* Acquire the dsound */
if
(
!
This
->
dsound
)
{
IDirectSound_AddRef
(
This
->
parent
->
dsound
);
This
->
dsound
=
This
->
parent
->
dsound
;
}
IDirectSound_AddRef
(
This
->
dsound
);
}
else
{
/* Release the dsound */
IDirectSound_Release
(
This
->
dsound
);
IDirectSound_Release
(
This
->
parent
->
dsound
);
if
(
This
->
dsound
==
This
->
parent
->
dsound
)
This
->
dsound
=
NULL
;
}
This
->
active
=
active
;
...
...
@@ -567,7 +585,7 @@ static const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl = {
SynthPortImpl_IDirectMusicPort_DeviceIoControl
,
SynthPortImpl_IDirectMusicPort_SetNumChannelGroups
,
SynthPortImpl_IDirectMusicPort_GetNumChannelGroups
,
SynthPortImpl_IDirectMusicP
ort_Activate
,
synth_dmp
ort_Activate
,
SynthPortImpl_IDirectMusicPort_SetChannelPriority
,
SynthPortImpl_IDirectMusicPort_GetChannelPriority
,
synth_dmport_SetDirectSound
,
...
...
dlls/dmusic/tests/dmusic.c
View file @
43b3f844
...
...
@@ -179,7 +179,7 @@ static void test_setdsound(void)
hr
=
IDirectMusicPort_Activate
(
port
,
TRUE
);
ok
(
hr
==
S_OK
,
"Port Activate returned: %x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
todo_wine
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
/* Releasing dsound from dmusic */
hr
=
IDirectMusic_SetDirectSound
(
dmusic
,
NULL
,
NULL
);
...
...
@@ -231,13 +231,13 @@ static void test_setdsound(void)
hr
=
IDirectMusicPort_Activate
(
port
,
TRUE
);
ok
(
hr
==
S_OK
,
"Activate returned: %x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
todo_wine
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
ref
=
get_refcount
(
dsound2
);
ok
(
ref
==
2
,
"dsound2 ref count got %d expected 2
\n
"
,
ref
);
hr
=
IDirectMusicPort_Activate
(
port
,
TRUE
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Activate returned: %x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Activate returned: %x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
todo_wine
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
ok
(
ref
==
4
,
"dsound ref count got %d expected 4
\n
"
,
ref
);
ref
=
get_refcount
(
dsound2
);
ok
(
ref
==
2
,
"dsound2 ref count got %d expected 2
\n
"
,
ref
);
...
...
@@ -247,13 +247,13 @@ static void test_setdsound(void)
ref
=
get_refcount
(
dsound
);
ok
(
ref
==
3
,
"dsound ref count got %d expected 3
\n
"
,
ref
);
ref
=
get_refcount
(
dsound2
);
todo_wine
ok
(
ref
==
1
,
"dsound2 ref count got %d expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"dsound2 ref count got %d expected 1
\n
"
,
ref
);
hr
=
IDirectMusicPort_Activate
(
port
,
FALSE
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Port Activate returned: %x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Port Activate returned: %x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
ok
(
ref
==
3
,
"dsound ref count got %d expected 3
\n
"
,
ref
);
ref
=
get_refcount
(
dsound2
);
todo_wine
ok
(
ref
==
1
,
"dsound2 ref count got %d expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"dsound2 ref count got %d expected 1
\n
"
,
ref
);
IDirectMusicPort_Release
(
port
);
IDirectMusic_Release
(
dmusic
);
...
...
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