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
096bfbd2
Commit
096bfbd2
authored
May 31, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Simplify the creation of a DirectMusic8 object.
Also lock/unlock the module only on creation/destruction of the object.
parent
d82e2935
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
dmusic.c
dlls/dmusic/dmusic.c
+7
-13
No files found.
dlls/dmusic/dmusic.c
View file @
096bfbd2
...
...
@@ -61,8 +61,6 @@ static ULONG WINAPI IDirectMusic8Impl_AddRef(LPDIRECTMUSIC8 iface)
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
This
,
ref
);
DMUSIC_LockModule
();
return
ref
;
}
...
...
@@ -78,10 +76,9 @@ static ULONG WINAPI IDirectMusic8Impl_Release(LPDIRECTMUSIC8 iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
system_ports
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
ppPorts
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMUSIC_UnlockModule
();
}
DMUSIC_UnlockModule
();
return
ref
;
}
...
...
@@ -417,7 +414,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl(LPCGUID riid, LPVOID* ret_iface, LPU
return
E_OUTOFMEMORY
;
dmusic
->
IDirectMusic8_iface
.
lpVtbl
=
&
DirectMusic8_Vtbl
;
dmusic
->
ref
=
0
;
/* Will be inited by QueryInterface */
dmusic
->
ref
=
1
;
dmusic
->
pMasterClock
=
NULL
;
dmusic
->
ppPorts
=
NULL
;
dmusic
->
nrofports
=
0
;
...
...
@@ -427,14 +424,11 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl(LPCGUID riid, LPVOID* ret_iface, LPU
return
ret
;
}
ret
=
IDirectMusic8Impl_QueryInterface
(
&
dmusic
->
IDirectMusic8_iface
,
riid
,
ret_iface
);
if
(
FAILED
(
ret
))
{
IReferenceClock_Release
(
&
dmusic
->
pMasterClock
->
IReferenceClock_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
dmusic
);
return
ret
;
}
create_system_ports_list
(
dmusic
);
return
S_OK
;
DMUSIC_LockModule
();
ret
=
IDirectMusic8Impl_QueryInterface
(
&
dmusic
->
IDirectMusic8_iface
,
riid
,
ret_iface
);
IDirectMusic8Impl_Release
(
&
dmusic
->
IDirectMusic8_iface
);
return
ret
;
}
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