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
540ae18f
Commit
540ae18f
authored
May 14, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: COM cleanup of IReferenceClock.
parent
a188587a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
22 deletions
+44
-22
clock.c
dlls/dmusic/clock.c
+43
-21
dmusic_private.h
dlls/dmusic/dmusic_private.h
+1
-1
No files found.
dlls/dmusic/clock.c
View file @
540ae18f
/* IReferenceClock Implementation
/*
* IReferenceClock Implementation
*
* Copyright (C) 2003-2004 Rok Mandeljc
*
...
...
@@ -21,9 +22,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dmusic
);
static
inline
IReferenceClockImpl
*
impl_from_IReferenceClock
(
IReferenceClock
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IReferenceClockImpl
,
IReferenceClock_iface
);
}
/* IReferenceClockImpl IUnknown part: */
static
HRESULT
WINAPI
IReferenceClockImpl_QueryInterface
(
IReferenceClock
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
static
HRESULT
WINAPI
IReferenceClockImpl_QueryInterface
(
IReferenceClock
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
...
...
@@ -36,8 +43,9 @@ static HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IReferenceClockImpl_AddRef
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
static
ULONG
WINAPI
IReferenceClockImpl_AddRef
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -47,8 +55,9 @@ static ULONG WINAPI IReferenceClockImpl_AddRef (IReferenceClock *iface) {
return
refCount
;
}
static
ULONG
WINAPI
IReferenceClockImpl_Release
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
static
ULONG
WINAPI
IReferenceClockImpl_Release
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -63,28 +72,41 @@ static ULONG WINAPI IReferenceClockImpl_Release (IReferenceClock *iface) {
}
/* IReferenceClockImpl IReferenceClock part: */
static
HRESULT
WINAPI
IReferenceClockImpl_GetTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
*
pTime
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
pTime
);
static
HRESULT
WINAPI
IReferenceClockImpl_GetTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
*
pTime
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pTime
);
*
pTime
=
This
->
rtTime
;
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
baseTime
,
REFERENCE_TIME
streamTime
,
HANDLE
hEvent
,
DWORD
*
pdwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
FIXME
(
"(%p, 0x%s, 0x%s, %p, %p): stub
\n
"
,
This
,
wine_dbgstr_longlong
(
baseTime
),
wine_dbgstr_longlong
(
streamTime
),
hEvent
,
pdwAdviseCookie
);
static
HRESULT
WINAPI
IReferenceClockImpl_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
baseTime
,
REFERENCE_TIME
streamTime
,
HANDLE
hEvent
,
DWORD
*
pdwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"(%p)->(0x%s, 0x%s, %p, %p): stub
\n
"
,
This
,
wine_dbgstr_longlong
(
baseTime
),
wine_dbgstr_longlong
(
streamTime
),
hEvent
,
pdwAdviseCookie
);
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
startTime
,
REFERENCE_TIME
periodTime
,
HANDLE
hSemaphore
,
DWORD
*
pdwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
FIXME
(
"(%p, 0x%s, 0x%s, %p, %p): stub
\n
"
,
This
,
wine_dbgstr_longlong
(
startTime
),
wine_dbgstr_longlong
(
periodTime
),
hSemaphore
,
pdwAdviseCookie
);
static
HRESULT
WINAPI
IReferenceClockImpl_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
startTime
,
REFERENCE_TIME
periodTime
,
HANDLE
hSemaphore
,
DWORD
*
pdwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"(%p)->(0x%s, 0x%s, %p, %p): stub
\n
"
,
This
,
wine_dbgstr_longlong
(
startTime
),
wine_dbgstr_longlong
(
periodTime
),
hSemaphore
,
pdwAdviseCookie
);
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_Unadvise
(
IReferenceClock
*
iface
,
DWORD
dwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dwAdviseCookie
);
static
HRESULT
WINAPI
IReferenceClockImpl_Unadvise
(
IReferenceClock
*
iface
,
DWORD
dwAdviseCookie
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
dwAdviseCookie
);
return
S_OK
;
}
...
...
@@ -111,8 +133,8 @@ HRESULT DMUSIC_CreateReferenceClockImpl(LPCGUID riid, LPVOID* ret_iface, LPUNKNO
return
E_OUTOFMEMORY
;
}
clock
->
lpVtbl
=
&
ReferenceClock_Vtbl
;
clock
->
ref
=
0
;
/*
w
ill be inited by QueryInterface */
clock
->
IReferenceClock_iface
.
lpVtbl
=
&
ReferenceClock_Vtbl
;
clock
->
ref
=
0
;
/*
W
ill be inited by QueryInterface */
clock
->
rtTime
=
0
;
clock
->
pClockInfo
.
dwSize
=
sizeof
(
DMUS_CLOCKINFO
);
...
...
dlls/dmusic/dmusic_private.h
View file @
540ae18f
...
...
@@ -167,7 +167,7 @@ extern HRESULT DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj,
*/
struct
IReferenceClockImpl
{
/* IUnknown fields */
const
IReferenceClockVtbl
*
lpVtbl
;
IReferenceClock
IReferenceClock_iface
;
LONG
ref
;
/* IReferenceClockImpl fields */
...
...
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