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
14f89931
Commit
14f89931
authored
May 12, 2017
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Initialize dmusic in InitAudio().
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3505137d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
performance.c
dlls/dmime/performance.c
+8
-1
performance.c
dlls/dmime/tests/performance.c
+3
-3
No files found.
dlls/dmime/performance.c
View file @
14f89931
...
...
@@ -802,6 +802,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown(IDirectMusicPerform
This
->
dsound
=
NULL
;
}
if
(
This
->
dmusic
)
{
IDirectMusic_SetDirectSound
(
This
->
dmusic
,
NULL
,
NULL
);
IDirectMusic8_Release
(
This
->
dmusic
);
This
->
dmusic
=
NULL
;
}
...
...
@@ -895,6 +896,10 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform
IDirectSound_AddRef
(
This
->
dsound
);
}
hr
=
IDirectMusic8_SetDirectSound
(
This
->
dmusic
,
This
->
dsound
,
NULL
);
if
(
FAILED
(
hr
))
goto
error
;
if
(
!
params
)
{
This
->
params
.
dwSize
=
sizeof
(
DMUS_AUDIOPARAMS
);
This
->
params
.
fInitNow
=
FALSE
;
...
...
@@ -910,9 +915,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio(IDirectMusicPerform
if
(
default_path_type
)
{
hr
=
IDirectMusicPerformance8_CreateStandardAudioPath
(
iface
,
default_path_type
,
num_channels
,
FALSE
,
&
This
->
pDefaultPath
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
IDirectMusic8_SetDirectSound
(
This
->
dmusic
,
NULL
,
NULL
);
goto
error
;
}
}
if
(
dsound
&&
!*
dsound
)
{
*
dsound
=
This
->
dsound
;
...
...
dlls/dmime/tests/performance.c
View file @
14f89931
...
...
@@ -129,7 +129,7 @@ static HRESULT test_InitAudio(void)
hr
=
IDirectMusicPerformance8_InitAudio
(
performance
,
&
dmusic
,
&
dsound
,
NULL
,
0
,
64
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"InitAudio failed: %08x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
todo_wine
ok
(
ref
==
3
,
"dsound ref count got %d expected 3
\n
"
,
ref
);
ok
(
ref
==
3
,
"dsound ref count got %d expected 3
\n
"
,
ref
);
ref
=
get_refcount
(
dmusic
);
ok
(
ref
==
2
,
"dmusic ref count got %d expected 2
\n
"
,
ref
);
destroy_performance
(
performance
,
NULL
,
NULL
);
...
...
@@ -171,7 +171,7 @@ static HRESULT test_InitAudio(void)
hr
=
IDirectMusicPerformance8_InitAudio
(
performance
,
&
dmusic
,
&
dsound
,
NULL
,
0
,
64
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"InitAudio failed: %08x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
ok
(
ref
==
2
,
"dsound ref count got %d expected 2
\n
"
,
ref
);
todo_wine
ok
(
ref
==
2
,
"dsound ref count got %d expected 2
\n
"
,
ref
);
ref
=
get_refcount
(
dmusic
);
ok
(
ref
==
2
,
"dmusic ref count got %d expected 2
\n
"
,
ref
);
destroy_performance
(
performance
,
dmusic
,
dsound
);
...
...
@@ -185,7 +185,7 @@ static HRESULT test_InitAudio(void)
hr
=
IDirectMusicPerformance8_InitAudio
(
performance
,
&
dmusic
,
NULL
,
NULL
,
0
,
64
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"InitAudio failed: %08x
\n
"
,
hr
);
ref
=
get_refcount
(
dsound
);
ok
(
ref
==
2
,
"dsound ref count got %d expected 2
\n
"
,
ref
);
todo_wine
ok
(
ref
==
2
,
"dsound ref count got %d expected 2
\n
"
,
ref
);
ref
=
get_refcount
(
dmusic
);
ok
(
ref
==
2
,
"dmusic ref count got %d expected 2
\n
"
,
ref
);
destroy_performance
(
performance
,
dmusic
,
dsound
);
...
...
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