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
b75e8bc6
Commit
b75e8bc6
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: Use more sensible and consistent field names for IDirectMusic8Impl.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
251d1c0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
25 deletions
+19
-25
dmusic.c
dlls/dmusic/dmusic.c
+14
-17
dmusic_private.h
dlls/dmusic/dmusic_private.h
+5
-8
No files found.
dlls/dmusic/dmusic.c
View file @
b75e8bc6
...
...
@@ -72,9 +72,9 @@ static ULONG WINAPI IDirectMusic8Impl_Release(LPDIRECTMUSIC8 iface)
TRACE
(
"(%p)->(): new ref = %u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IReferenceClock_Release
(
&
This
->
pMasterC
lock
->
IReferenceClock_iface
);
IReferenceClock_Release
(
&
This
->
master_c
lock
->
IReferenceClock_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
system_ports
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
p
pP
orts
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
ports
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
DMUSIC_UnlockModule
();
}
...
...
@@ -92,7 +92,7 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD ind
if
(
!
port_caps
)
return
E_POINTER
;
if
(
index
>=
This
->
n
b
_system_ports
)
if
(
index
>=
This
->
n
um
_system_ports
)
return
S_FALSE
;
*
port_caps
=
This
->
system_ports
[
index
].
caps
;
...
...
@@ -156,12 +156,12 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSI
*
port
=
NULL
;
return
hr
;
}
This
->
n
rof
ports
++
;
if
(
!
This
->
p
pP
orts
)
This
->
p
pPorts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPDIRECTMUSICPORT
)
*
This
->
nrof
ports
);
This
->
n
um_
ports
++
;
if
(
!
This
->
ports
)
This
->
p
orts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IDirectMusicPort
*
)
*
This
->
num_
ports
);
else
This
->
p
pPorts
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
ppPorts
,
sizeof
(
LPDIRECTMUSICPORT
)
*
This
->
nrof
ports
);
This
->
p
pPorts
[
This
->
nrof
ports
-
1
]
=
new_port
;
This
->
p
orts
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
ports
,
sizeof
(
IDirectMusicPort
*
)
*
This
->
num_
ports
);
This
->
p
orts
[
This
->
num_
ports
-
1
]
=
new_port
;
*
port
=
new_port
;
return
S_OK
;
}
...
...
@@ -209,9 +209,9 @@ static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPG
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
guid_clock
,
reference_clock
);
if
(
guid_clock
)
*
guid_clock
=
This
->
pMasterC
lock
->
pClockInfo
.
guidClock
;
*
guid_clock
=
This
->
master_c
lock
->
pClockInfo
.
guidClock
;
if
(
reference_clock
)
{
*
reference_clock
=
&
This
->
pMasterC
lock
->
IReferenceClock_iface
;
*
reference_clock
=
&
This
->
master_c
lock
->
IReferenceClock_iface
;
IReferenceClock_AddRef
(
*
reference_clock
);
}
...
...
@@ -235,9 +235,9 @@ static HRESULT WINAPI IDirectMusic8Impl_Activate(LPDIRECTMUSIC8 iface, BOOL enab
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
enable
);
for
(
i
=
0
;
i
<
This
->
n
rof
ports
;
i
++
)
for
(
i
=
0
;
i
<
This
->
n
um_
ports
;
i
++
)
{
hr
=
IDirectMusicPort_Activate
(
This
->
p
pP
orts
[
i
],
enable
);
hr
=
IDirectMusicPort_Activate
(
This
->
ports
[
i
],
enable
);
if
(
FAILED
(
hr
))
return
hr
;
}
...
...
@@ -396,7 +396,7 @@ static void create_system_ports_list(IDirectMusic8Impl* object)
if
(
FAILED
(
hr
))
nb_ports
--
;
object
->
n
b
_system_ports
=
nb_ports
;
object
->
n
um
_system_ports
=
nb_ports
;
}
/* For ClassFactory */
...
...
@@ -417,10 +417,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl(LPCGUID riid, LPVOID* ret_iface, LPU
dmusic
->
IDirectMusic8_iface
.
lpVtbl
=
&
DirectMusic8_Vtbl
;
dmusic
->
ref
=
1
;
dmusic
->
pMasterClock
=
NULL
;
dmusic
->
ppPorts
=
NULL
;
dmusic
->
nrofports
=
0
;
ret
=
DMUSIC_CreateReferenceClockImpl
(
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
dmusic
->
pMasterClock
,
NULL
);
ret
=
DMUSIC_CreateReferenceClockImpl
(
&
IID_IReferenceClock
,
(
void
**
)
&
dmusic
->
master_clock
,
NULL
);
if
(
FAILED
(
ret
))
{
HeapFree
(
GetProcessHeap
(),
0
,
dmusic
);
return
ret
;
...
...
dlls/dmusic/dmusic_private.h
View file @
b75e8bc6
...
...
@@ -106,16 +106,13 @@ extern HRESULT DMUSIC_CreateDirectMusicInstrumentImpl (LPCGUID lpcGUID, LPVOID*
* IDirectMusic8Impl implementation structure
*/
struct
IDirectMusic8Impl
{
/* IUnknown fields */
IDirectMusic8
IDirectMusic8_iface
;
LONG
ref
;
/* IDirectMusicImpl fields */
IReferenceClockImpl
*
pMasterClock
;
IDirectMusicPort
**
ppPorts
;
int
nrofports
;
port_info
*
system_ports
;
int
nb_system_ports
;
IReferenceClockImpl
*
master_clock
;
IDirectMusicPort
**
ports
;
int
num_ports
;
port_info
*
system_ports
;
int
num_system_ports
;
};
/*****************************************************************************
...
...
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