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
6ec0bfe1
Commit
6ec0bfe1
authored
Aug 20, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Add a stub IDirectMusicThru to the midi ports.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fcedc2b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
port.c
dlls/dmusic/port.c
+50
-1
No files found.
dlls/dmusic/port.c
View file @
6ec0bfe1
...
...
@@ -906,6 +906,7 @@ HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_param
struct
midi_port
{
IDirectMusicPort
IDirectMusicPort_iface
;
IDirectMusicThru
IDirectMusicThru_iface
;
LONG
ref
;
IReferenceClock
*
clock
;
};
...
...
@@ -918,17 +919,21 @@ static inline struct midi_port *impl_from_IDirectMusicPort(IDirectMusicPort *ifa
static
HRESULT
WINAPI
midi_IDirectMusicPort_QueryInterface
(
IDirectMusicPort
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicPort
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicPort
))
*
ret_iface
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectMusicThru
))
*
ret_iface
=
&
This
->
IDirectMusicThru_iface
;
else
{
WARN
(
"no interface for %s
\n
"
,
debugstr_dmguid
(
riid
));
*
ret_iface
=
NULL
;
return
E_NOINTERFACE
;
}
I
DirectMusicPort_AddRef
(
iface
);
I
Unknown_AddRef
((
IUnknown
*
)
*
ret_
iface
);
return
S_OK
;
}
...
...
@@ -1126,6 +1131,49 @@ static const IDirectMusicPortVtbl midi_port_vtbl = {
midi_IDirectMusicPort_GetFormat
,
};
static
inline
struct
midi_port
*
impl_from_IDirectMusicThru
(
IDirectMusicThru
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
midi_port
,
IDirectMusicThru_iface
);
}
static
HRESULT
WINAPI
midi_IDirectMusicThru_QueryInterface
(
IDirectMusicThru
*
iface
,
REFIID
riid
,
void
**
ret_iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicThru
(
iface
);
return
IDirectMusicPort_QueryInterface
(
&
This
->
IDirectMusicPort_iface
,
riid
,
ret_iface
);
}
static
ULONG
WINAPI
midi_IDirectMusicThru_AddRef
(
IDirectMusicThru
*
iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicThru
(
iface
);
return
IDirectMusicPort_AddRef
(
&
This
->
IDirectMusicPort_iface
);
}
static
ULONG
WINAPI
midi_IDirectMusicThru_Release
(
IDirectMusicThru
*
iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicThru
(
iface
);
return
IDirectMusicPort_Release
(
&
This
->
IDirectMusicPort_iface
);
}
static
HRESULT
WINAPI
midi_IDirectMusicThru_ThruChannel
(
IDirectMusicThru
*
iface
,
DWORD
src_group
,
DWORD
src_channel
,
DWORD
dest_group
,
DWORD
dest_channel
,
IDirectMusicPort
*
dest_port
)
{
FIXME
(
"(%p, %u, %u, %u, %u, %p) stub!
\n
"
,
iface
,
src_group
,
src_channel
,
dest_group
,
dest_channel
,
dest_port
);
return
E_NOTIMPL
;
}
static
const
IDirectMusicThruVtbl
midi_thru_vtbl
=
{
midi_IDirectMusicThru_QueryInterface
,
midi_IDirectMusicThru_AddRef
,
midi_IDirectMusicThru_Release
,
midi_IDirectMusicThru_ThruChannel
,
};
HRESULT
midi_port_create
(
IDirectMusic8Impl
*
parent
,
DMUS_PORTPARAMS
*
params
,
DMUS_PORTCAPS
*
caps
,
IDirectMusicPort
**
port
)
{
...
...
@@ -1136,6 +1184,7 @@ HRESULT midi_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMU
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicPort_iface
.
lpVtbl
=
&
midi_port_vtbl
;
obj
->
IDirectMusicThru_iface
.
lpVtbl
=
&
midi_thru_vtbl
;
obj
->
ref
=
1
;
hr
=
DMUSIC_CreateReferenceClockImpl
(
&
IID_IReferenceClock
,
(
void
**
)
&
obj
->
clock
,
NULL
);
...
...
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