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
1f3d99a2
Commit
1f3d99a2
authored
May 03, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Add stubbed IKsControl interface to DirectMusicSynth object.
parent
42d18a32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
11 deletions
+87
-11
dmsynth_private.h
dlls/dmsynth/dmsynth_private.h
+11
-9
synth.c
dlls/dmsynth/synth.c
+75
-1
dmsynth.c
dlls/dmsynth/tests/dmsynth.c
+1
-1
No files found.
dlls/dmsynth/dmsynth_private.h
View file @
1f3d99a2
...
...
@@ -39,6 +39,7 @@
#include "dmusici.h"
#include "dmusicf.h"
#include "dmusics.h"
#include "dmksctrl.h"
/*****************************************************************************
* Interfaces
...
...
@@ -56,15 +57,16 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LP
* IDirectMusicSynth8Impl implementation structure
*/
struct
IDirectMusicSynth8Impl
{
/* IUnknown fields */
IDirectMusicSynth8
IDirectMusicSynth8_iface
;
LONG
ref
;
/* IDirectMusicSynth8 fields */
DMUS_PORTCAPS
pCaps
;
BOOL
fActive
;
IReferenceClock
*
pLatencyClock
;
IDirectMusicSynthSinkImpl
*
pSynthSink
;
/* IUnknown fields */
IDirectMusicSynth8
IDirectMusicSynth8_iface
;
IKsControl
IKsControl_iface
;
LONG
ref
;
/* IDirectMusicSynth8 fields */
DMUS_PORTCAPS
pCaps
;
BOOL
fActive
;
IReferenceClock
*
pLatencyClock
;
IDirectMusicSynthSinkImpl
*
pSynthSink
;
};
/*****************************************************************************
...
...
dlls/dmsynth/synth.c
View file @
1f3d99a2
/* IDirectMusicSynth8 Implementation
/*
* IDirectMusicSynth8 Implementation
*
* Copyright (C) 2003-2004 Rok Mandeljc
*
...
...
@@ -17,6 +18,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "objbase.h"
#include "initguid.h"
#include "dmksctrl.h"
#include "dmsynth_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmsynth
);
...
...
@@ -40,6 +47,12 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface(LPDIRECTMUSICSYNTH8
*
ppobj
=
This
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsControl
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
&
This
->
IKsControl_iface
;
return
S_OK
;
}
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
...
...
@@ -324,6 +337,66 @@ static const IDirectMusicSynth8Vtbl DirectMusicSynth8_Vtbl = {
IDirectMusicSynth8Impl_AssignChannelToBuses
};
static
inline
IDirectMusicSynth8Impl
*
impl_from_IKsControl
(
IKsControl
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectMusicSynth8Impl
,
IKsControl_iface
);
}
static
HRESULT
WINAPI
DMSynthImpl_IKsControl_QueryInterface
(
IKsControl
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectMusicSynth8Impl
*
This
=
impl_from_IKsControl
(
iface
);
return
IDirectMusicSynth8Impl_QueryInterface
(
&
This
->
IDirectMusicSynth8_iface
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
DMSynthImpl_IKsControl_AddRef
(
IKsControl
*
iface
)
{
IDirectMusicSynth8Impl
*
This
=
impl_from_IKsControl
(
iface
);
return
IDirectMusicSynth8Impl_AddRef
(
&
This
->
IDirectMusicSynth8_iface
);
}
static
ULONG
WINAPI
DMSynthImpl_IKsControl_Release
(
IKsControl
*
iface
)
{
IDirectMusicSynth8Impl
*
This
=
impl_from_IKsControl
(
iface
);
return
IDirectMusicSynth8Impl_Release
(
&
This
->
IDirectMusicSynth8_iface
);
}
static
HRESULT
WINAPI
DMSynthImpl_IKsControl_KsProperty
(
IKsControl
*
iface
,
PKSPROPERTY
Property
,
ULONG
PropertyLength
,
LPVOID
PropertyData
,
ULONG
DataLength
,
ULONG
*
BytesReturned
)
{
FIXME
(
"(%p)->(%p, %u, %p, %u, %p): stub
\n
"
,
iface
,
Property
,
PropertyLength
,
PropertyData
,
DataLength
,
BytesReturned
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DMSynthImpl_IKsControl_KsMethod
(
IKsControl
*
iface
,
PKSMETHOD
Method
,
ULONG
MethodLength
,
LPVOID
MethodData
,
ULONG
DataLength
,
ULONG
*
BytesReturned
)
{
FIXME
(
"(%p)->(%p, %u, %p, %u, %p): stub
\n
"
,
iface
,
Method
,
MethodLength
,
MethodData
,
DataLength
,
BytesReturned
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
DMSynthImpl_IKsControl_KsEvent
(
IKsControl
*
iface
,
PKSEVENT
Event
,
ULONG
EventLength
,
LPVOID
EventData
,
ULONG
DataLength
,
ULONG
*
BytesReturned
)
{
FIXME
(
"(%p)->(%p, %u, %p, %u, %p): stub
\n
"
,
iface
,
Event
,
EventLength
,
EventData
,
DataLength
,
BytesReturned
);
return
E_NOTIMPL
;
}
static
const
IKsControlVtbl
DMSynthImpl_IKsControl_Vtbl
=
{
DMSynthImpl_IKsControl_QueryInterface
,
DMSynthImpl_IKsControl_AddRef
,
DMSynthImpl_IKsControl_Release
,
DMSynthImpl_IKsControl_KsProperty
,
DMSynthImpl_IKsControl_KsMethod
,
DMSynthImpl_IKsControl_KsEvent
};
/* for ClassFactory */
HRESULT
WINAPI
DMUSIC_CreateDirectMusicSynthImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
)
{
...
...
@@ -336,6 +409,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj
return
E_OUTOFMEMORY
;
}
obj
->
IDirectMusicSynth8_iface
.
lpVtbl
=
&
DirectMusicSynth8_Vtbl
;
obj
->
IKsControl_iface
.
lpVtbl
=
&
DMSynthImpl_IKsControl_Vtbl
;
obj
->
ref
=
0
;
/* fill in caps */
obj
->
pCaps
.
dwSize
=
sizeof
(
DMUS_PORTCAPS
);
...
...
dlls/dmsynth/tests/dmsynth.c
View file @
1f3d99a2
...
...
@@ -51,7 +51,7 @@ static void test_dmsynth(void)
ok
(
hr
==
S_OK
,
"CoCreateInstance returned: %x
\n
"
,
hr
);
hr
=
IDirectMusicSynth_QueryInterface
(
dmsynth
,
&
IID_IKsControl
,
(
LPVOID
*
)
&
control_synth
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectMusicSynth_QueryInterface returned: %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IDirectMusicSynth_QueryInterface returned: %x
\n
"
,
hr
);
hr
=
IDirectMusicSynthSink_QueryInterface
(
dmsynth_sink
,
&
IID_IKsControl
,
(
LPVOID
*
)
&
control_sink
);
todo_wine
ok
(
hr
==
S_OK
,
"IDirectMusicSynthSink_QueryInterface returned: %x
\n
"
,
hr
);
...
...
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