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
23b61b0d
Commit
23b61b0d
authored
Sep 04, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Use IReferenceClock interface from strmif.idl in dmusicc.h.
parent
ec2a7a32
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
71 deletions
+27
-71
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+3
-3
clock.c
dlls/dmusic/clock.c
+8
-12
dmusic.c
dlls/dmusic/dmusic.c
+8
-10
dmusic.c
dlls/dmusic/tests/dmusic.c
+3
-3
dmusicc.h
include/dmusicc.h
+5
-43
No files found.
dlls/dmsynth/tests/dmsynth.c
View file @
23b61b0d
...
...
@@ -760,20 +760,20 @@ static HRESULT WINAPI test_sink_latency_clock_GetTime(IReferenceClock *iface, RE
}
static
HRESULT
WINAPI
test_sink_latency_clock_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
base
,
REFERENCE_TIME
offset
,
H
ANDLE
event
,
DWORD
*
cookie
)
REFERENCE_TIME
base
,
REFERENCE_TIME
offset
,
H
EVENT
event
,
DWORD_PTR
*
cookie
)
{
ok
(
0
,
"unexpected %s
\n
"
,
__func__
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
test_sink_latency_clock_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
start
,
REFERENCE_TIME
period
,
H
ANDLE
semaphore
,
DWORD
*
cookie
)
REFERENCE_TIME
start
,
REFERENCE_TIME
period
,
H
SEMAPHORE
semaphore
,
DWORD_PTR
*
cookie
)
{
ok
(
0
,
"unexpected %s
\n
"
,
__func__
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
test_sink_latency_clock_Unadvise
(
IReferenceClock
*
iface
,
DWORD
cookie
)
static
HRESULT
WINAPI
test_sink_latency_clock_Unadvise
(
IReferenceClock
*
iface
,
DWORD
_PTR
cookie
)
{
ok
(
0
,
"unexpected %s
\n
"
,
__func__
);
return
E_NOTIMPL
;
...
...
dlls/dmusic/clock.c
View file @
23b61b0d
...
...
@@ -80,30 +80,26 @@ static HRESULT WINAPI IReferenceClockImpl_GetTime(IReferenceClock *iface, REFERE
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
baseTime
,
REFERENCE_TIME
streamTime
,
HANDLE
hEvent
,
DWORD
*
pdwAdviseCookie
)
static
HRESULT
WINAPI
IReferenceClockImpl_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
base
,
REFERENCE_TIME
offset
,
HEVENT
event
,
DWORD_PTR
*
cookie
)
{
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
);
FIXME
(
"(%p)->(%I64d, %I64d, %#Ix, %p): stub
\n
"
,
This
,
base
,
offset
,
event
,
cookie
);
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
startTime
,
REFERENCE_TIME
periodTime
,
HANDLE
hSemaphore
,
DWORD
*
pdwAdviseCookie
)
static
HRESULT
WINAPI
IReferenceClockImpl_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
start
,
REFERENCE_TIME
period
,
HSEMAPHORE
semaphore
,
DWORD_PTR
*
cookie
)
{
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
);
FIXME
(
"(%p)->(%I64d, %I64d, %#Ix, %p): stub
\n
"
,
This
,
start
,
period
,
semaphore
,
cookie
);
return
S_OK
;
}
static
HRESULT
WINAPI
IReferenceClockImpl_Unadvise
(
IReferenceClock
*
iface
,
DWORD
dwAdviseC
ookie
)
static
HRESULT
WINAPI
IReferenceClockImpl_Unadvise
(
IReferenceClock
*
iface
,
DWORD
_PTR
c
ookie
)
{
IReferenceClockImpl
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"(%p, %ld): stub
\n
"
,
This
,
dwAdviseCookie
);
FIXME
(
"(%p, %#Ix): stub
\n
"
,
This
,
cookie
);
return
S_OK
;
}
...
...
dlls/dmusic/dmusic.c
View file @
23b61b0d
...
...
@@ -96,25 +96,23 @@ static HRESULT WINAPI master_IReferenceClock_GetTime(IReferenceClock *iface,
return
hr
;
}
static
HRESULT
WINAPI
master_IReferenceClock_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
base
,
REFERENCE_TIME
offset
,
HANDLE
event
,
DWORD
*
cookie
)
static
HRESULT
WINAPI
master_IReferenceClock_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
base
,
REFERENCE_TIME
offset
,
HEVENT
event
,
DWORD_PTR
*
cookie
)
{
TRACE
(
"(%p, %s, %s, %p, %p): method not implemented
\n
"
,
iface
,
wine_dbgstr_longlong
(
base
),
wine_dbgstr_longlong
(
offset
),
event
,
cookie
);
FIXME
(
"(%p, %I64d, %I64d, %#Ix, %p): stub
\n
"
,
iface
,
base
,
offset
,
event
,
cookie
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
master_IReferenceClock_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
start
,
REFERENCE_TIME
period
,
HANDLE
semaphore
,
DWORD
*
cookie
)
static
HRESULT
WINAPI
master_IReferenceClock_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
start
,
REFERENCE_TIME
period
,
HSEMAPHORE
semaphore
,
DWORD_PTR
*
cookie
)
{
TRACE
(
"(%p, %s, %s, %p, %p): method not implemented
\n
"
,
iface
,
wine_dbgstr_longlong
(
start
),
wine_dbgstr_longlong
(
period
),
semaphore
,
cookie
);
FIXME
(
"(%p, %I64d, %I64d, %#Ix, %p): stub
\n
"
,
iface
,
start
,
period
,
semaphore
,
cookie
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
master_IReferenceClock_Unadvise
(
IReferenceClock
*
iface
,
DWORD
cookie
)
static
HRESULT
WINAPI
master_IReferenceClock_Unadvise
(
IReferenceClock
*
iface
,
DWORD
_PTR
cookie
)
{
TRACE
(
"(%p, %#lx): method not implemented
\n
"
,
iface
,
cookie
);
FIXME
(
"(%p, %#Ix): stub
\n
"
,
iface
,
cookie
);
return
E_NOTIMPL
;
}
...
...
dlls/dmusic/tests/dmusic.c
View file @
23b61b0d
...
...
@@ -862,7 +862,7 @@ static void test_master_clock(void)
LARGE_INTEGER
counter
,
freq
;
DMUS_CLOCKINFO
clock_info
;
IDirectMusic
*
dmusic
;
DWORD
cookie
;
DWORD
_PTR
cookie
;
HRESULT
hr
;
ULONG
ref
;
GUID
guid
;
...
...
@@ -912,10 +912,10 @@ static void test_master_clock(void)
ok
(
time2
-
time1
>
80
*
10000
,
"Expected about %s, but got %s.
\n
"
,
wine_dbgstr_longlong
(
time1
+
100
*
10000
),
wine_dbgstr_longlong
(
time2
));
hr
=
IReferenceClock_AdviseTime
(
clock
,
0
,
0
,
NULL
,
&
cookie
);
hr
=
IReferenceClock_AdviseTime
(
clock
,
0
,
0
,
0
,
&
cookie
);
ok
(
hr
==
E_NOTIMPL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IReferenceClock_AdvisePeriodic
(
clock
,
0
,
0
,
NULL
,
&
cookie
);
hr
=
IReferenceClock_AdvisePeriodic
(
clock
,
0
,
0
,
0
,
&
cookie
);
ok
(
hr
==
E_NOTIMPL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IReferenceClock_Unadvise
(
clock
,
0
);
...
...
include/dmusicc.h
View file @
23b61b0d
...
...
@@ -31,6 +31,7 @@
#include <dmdls.h>
#include <dsound.h>
#include <dmusbuff.h>
#include <strmif.h>
#include <pshpack8.h>
...
...
@@ -108,8 +109,6 @@ typedef struct IDirectMusicPort *LPDIRECTMUSICPORT;
typedef
struct
IDirectMusicPort
IDirectMusicPort8
,
*
LPDIRECTMUSICPORT8
;
typedef
struct
IDirectMusicThru
*
LPDIRECTMUSICTHRU
;
typedef
struct
IDirectMusicThru
IDirectMusicThru8
,
*
LPDIRECTMUSICTHRU8
;
typedef
struct
IReferenceClock
*
LPREFERENCECLOCK
;
/*****************************************************************************
* Typedef definitions
...
...
@@ -381,7 +380,7 @@ DECLARE_INTERFACE_(IDirectMusic,IUnknown)
STDMETHOD
(
CreateMusicBuffer
)(
THIS_
LPDMUS_BUFFERDESC
pBufferDesc
,
LPDIRECTMUSICBUFFER
*
ppBuffer
,
LPUNKNOWN
pUnkOuter
)
PURE
;
STDMETHOD
(
CreatePort
)(
THIS_
REFCLSID
rclsidPort
,
LPDMUS_PORTPARAMS
pPortParams
,
LPDIRECTMUSICPORT
*
ppPort
,
LPUNKNOWN
pUnkOuter
)
PURE
;
STDMETHOD
(
EnumMasterClock
)(
THIS_
DWORD
dwIndex
,
LPDMUS_CLOCKINFO
lpClockInfo
)
PURE
;
STDMETHOD
(
GetMasterClock
)(
THIS_
LPGUID
pguidClock
,
struct
IReferenceClock
**
ppReferenceClock
)
PURE
;
STDMETHOD
(
GetMasterClock
)(
THIS_
LPGUID
pguidClock
,
IReferenceClock
**
ppReferenceClock
)
PURE
;
STDMETHOD
(
SetMasterClock
)(
THIS_
REFGUID
rguidClock
)
PURE
;
STDMETHOD
(
Activate
)(
THIS_
BOOL
fEnable
)
PURE
;
STDMETHOD
(
GetDefaultPort
)(
THIS_
LPGUID
pguidPort
)
PURE
;
...
...
@@ -422,13 +421,13 @@ DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic)
STDMETHOD
(
CreateMusicBuffer
)(
THIS_
LPDMUS_BUFFERDESC
pBufferDesc
,
LPDIRECTMUSICBUFFER
*
ppBuffer
,
LPUNKNOWN
pUnkOuter
)
PURE
;
STDMETHOD
(
CreatePort
)(
THIS_
REFCLSID
rclsidPort
,
LPDMUS_PORTPARAMS
pPortParams
,
LPDIRECTMUSICPORT
*
ppPort
,
LPUNKNOWN
pUnkOuter
)
PURE
;
STDMETHOD
(
EnumMasterClock
)(
THIS_
DWORD
dwIndex
,
LPDMUS_CLOCKINFO
lpClockInfo
)
PURE
;
STDMETHOD
(
GetMasterClock
)(
THIS_
LPGUID
pguidClock
,
struct
IReferenceClock
**
ppReferenceClock
)
PURE
;
STDMETHOD
(
GetMasterClock
)(
THIS_
LPGUID
pguidClock
,
IReferenceClock
**
ppReferenceClock
)
PURE
;
STDMETHOD
(
SetMasterClock
)(
THIS_
REFGUID
rguidClock
)
PURE
;
STDMETHOD
(
Activate
)(
THIS_
BOOL
fEnable
)
PURE
;
STDMETHOD
(
GetDefaultPort
)(
THIS_
LPGUID
pguidPort
)
PURE
;
STDMETHOD
(
SetDirectSound
)(
THIS_
LPDIRECTSOUND
pDirectSound
,
HWND
hWnd
)
PURE
;
/*** IDirectMusic8 methods ***/
STDMETHOD
(
SetExternalMasterClock
)(
THIS_
struct
IReferenceClock
*
pClock
)
PURE
;
STDMETHOD
(
SetExternalMasterClock
)(
THIS_
IReferenceClock
*
pClock
)
PURE
;
};
#undef INTERFACE
...
...
@@ -655,7 +654,7 @@ DECLARE_INTERFACE_(IDirectMusicPort,IUnknown)
STDMETHOD
(
Read
)(
THIS_
LPDIRECTMUSICBUFFER
pBuffer
)
PURE
;
STDMETHOD
(
DownloadInstrument
)(
THIS_
IDirectMusicInstrument
*
pInstrument
,
IDirectMusicDownloadedInstrument
**
ppDownloadedInstrument
,
DMUS_NOTERANGE
*
pNoteRanges
,
DWORD
dwNumNoteRanges
)
PURE
;
STDMETHOD
(
UnloadInstrument
)(
THIS_
IDirectMusicDownloadedInstrument
*
pDownloadedInstrument
)
PURE
;
STDMETHOD
(
GetLatencyClock
)(
THIS_
struct
IReferenceClock
**
ppClock
)
PURE
;
STDMETHOD
(
GetLatencyClock
)(
THIS_
IReferenceClock
**
ppClock
)
PURE
;
STDMETHOD
(
GetRunningStats
)(
THIS_
LPDMUS_SYNTHSTATS
pStats
)
PURE
;
STDMETHOD
(
Compact
)(
THIS
)
PURE
;
STDMETHOD
(
GetCaps
)(
THIS_
LPDMUS_PORTCAPS
pPortCaps
)
PURE
;
...
...
@@ -720,43 +719,6 @@ DECLARE_INTERFACE_(IDirectMusicThru,IUnknown)
#define IDirectMusicThru_ThruChannel(p,a,b,c,d,e) (p)->lpVtbl->ThruChannel(p,a,b,c,d,e)
#endif
#ifndef __IReferenceClock_INTERFACE_DEFINED__
#define __IReferenceClock_INTERFACE_DEFINED__
DEFINE_GUID
(
IID_IReferenceClock
,
0x56a86897
,
0x0ad4
,
0x11ce
,
0xb0
,
0x3a
,
0x00
,
0x20
,
0xaf
,
0x0b
,
0xa7
,
0x70
);
/*****************************************************************************
* IReferenceClock interface
*/
#define INTERFACE IReferenceClock
DECLARE_INTERFACE_
(
IReferenceClock
,
IUnknown
)
{
/*** IUnknown methods ***/
STDMETHOD_
(
HRESULT
,
QueryInterface
)(
THIS_
REFIID
riid
,
void
**
ppvObject
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** IReferenceClock methods ***/
STDMETHOD
(
GetTime
)(
THIS_
REFERENCE_TIME
*
pTime
)
PURE
;
STDMETHOD
(
AdviseTime
)(
THIS_
REFERENCE_TIME
baseTime
,
REFERENCE_TIME
streamTime
,
HANDLE
hEvent
,
DWORD
*
pdwAdviseCookie
)
PURE
;
STDMETHOD
(
AdvisePeriodic
)(
THIS_
REFERENCE_TIME
startTime
,
REFERENCE_TIME
periodTime
,
HANDLE
hSemaphore
,
DWORD
*
pdwAdviseCookie
)
PURE
;
STDMETHOD
(
Unadvise
)(
THIS_
DWORD
dwAdviseCookie
)
PURE
;
};
#undef INTERFACE
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IReferenceClock_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IReferenceClock_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IReferenceClock_Release(p) (p)->lpVtbl->Release(p)
/*** IReferenceClock methods ***/
#define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a)
#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d)
#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d)
#define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
#endif
#endif
/* __IReferenceClock_INTERFACE_DEFINED__ */
#ifdef __cplusplus
}
#endif
...
...
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