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
8c48fba6
Commit
8c48fba6
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 midi out port.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ccf51e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
223 additions
and
2 deletions
+223
-2
port.c
dlls/dmusic/port.c
+223
-2
No files found.
dlls/dmusic/port.c
View file @
8c48fba6
...
...
@@ -21,6 +21,7 @@
#include <assert.h>
#include "dmusic_private.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dmusic
);
...
...
@@ -903,12 +904,232 @@ HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_param
return
hr
;
}
struct
midi_port
{
IDirectMusicPort
IDirectMusicPort_iface
;
LONG
ref
;
};
static
inline
struct
midi_port
*
impl_from_IDirectMusicPort
(
IDirectMusicPort
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
midi_port
,
IDirectMusicPort_iface
);
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_QueryInterface
(
IDirectMusicPort
*
iface
,
REFIID
riid
,
void
**
ret_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
{
WARN
(
"no interface for %s
\n
"
,
debugstr_dmguid
(
riid
));
*
ret_iface
=
NULL
;
return
E_NOINTERFACE
;
}
IDirectMusicPort_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
midi_IDirectMusicPort_AddRef
(
IDirectMusicPort
*
iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicPort
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
midi_IDirectMusicPort_Release
(
IDirectMusicPort
*
iface
)
{
struct
midi_port
*
This
=
impl_from_IDirectMusicPort
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
iface
,
ref
);
if
(
!
ref
)
heap_free
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_PlayBuffer
(
IDirectMusicPort
*
iface
,
IDirectMusicBuffer
*
buffer
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
buffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_SetReadNotificationHandle
(
IDirectMusicPort
*
iface
,
HANDLE
event
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
event
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_Read
(
IDirectMusicPort
*
iface
,
IDirectMusicBuffer
*
buffer
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
buffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_DownloadInstrument
(
IDirectMusicPort
*
iface
,
IDirectMusicInstrument
*
instrument
,
IDirectMusicDownloadedInstrument
**
downloaded
,
DMUS_NOTERANGE
*
ranges
,
DWORD
num_ranges
)
{
FIXME
(
"(%p, %p, %p, %p, %u) stub!
\n
"
,
iface
,
instrument
,
downloaded
,
ranges
,
num_ranges
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_UnloadInstrument
(
IDirectMusicPort
*
iface
,
IDirectMusicDownloadedInstrument
*
downloaded
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
downloaded
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetLatencyClock
(
IDirectMusicPort
*
iface
,
IReferenceClock
**
clock
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
clock
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetRunningStats
(
IDirectMusicPort
*
iface
,
DMUS_SYNTHSTATS
*
stats
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
stats
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_Compact
(
IDirectMusicPort
*
iface
)
{
FIXME
(
"(%p) stub!
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetCaps
(
IDirectMusicPort
*
iface
,
DMUS_PORTCAPS
*
caps
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
caps
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_DeviceIoControl
(
IDirectMusicPort
*
iface
,
DWORD
io_control_code
,
void
*
in
,
DWORD
size_in
,
void
*
out
,
DWORD
size_out
,
DWORD
*
ret_len
,
OVERLAPPED
*
overlapped
)
{
FIXME
(
"(%p, %u, %p, %u, %p, %u, %p, %p) stub!
\n
"
,
iface
,
io_control_code
,
in
,
size_in
,
out
,
size_out
,
ret_len
,
overlapped
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_SetNumChannelGroups
(
IDirectMusicPort
*
iface
,
DWORD
cgroups
)
{
FIXME
(
"(%p, %u) stub!
\n
"
,
iface
,
cgroups
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetNumChannelGroups
(
IDirectMusicPort
*
iface
,
DWORD
*
cgroups
)
{
FIXME
(
"(%p, %p) stub!
\n
"
,
iface
,
cgroups
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_Activate
(
IDirectMusicPort
*
iface
,
BOOL
active
)
{
FIXME
(
"(%p, %u) stub!
\n
"
,
iface
,
active
);
return
S_OK
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_SetChannelPriority
(
IDirectMusicPort
*
iface
,
DWORD
channel_group
,
DWORD
channel
,
DWORD
priority
)
{
FIXME
(
"(%p, %u, %u, %u) stub!
\n
"
,
iface
,
channel_group
,
channel
,
priority
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetChannelPriority
(
IDirectMusicPort
*
iface
,
DWORD
channel_group
,
DWORD
channel
,
DWORD
*
priority
)
{
FIXME
(
"(%p, %u, %u, %p) stub!
\n
"
,
iface
,
channel_group
,
channel
,
priority
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_SetDirectSound
(
IDirectMusicPort
*
iface
,
IDirectSound
*
dsound
,
IDirectSoundBuffer
*
dsbuffer
)
{
FIXME
(
"(%p, %p, %p) stub!
\n
"
,
iface
,
dsound
,
dsbuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
midi_IDirectMusicPort_GetFormat
(
IDirectMusicPort
*
iface
,
WAVEFORMATEX
*
format
,
DWORD
*
format_size
,
DWORD
*
buffer_size
)
{
FIXME
(
"(%p, %p, %p, %p) stub!
\n
"
,
iface
,
format
,
format_size
,
buffer_size
);
return
E_NOTIMPL
;
}
static
const
IDirectMusicPortVtbl
midi_port_vtbl
=
{
midi_IDirectMusicPort_QueryInterface
,
midi_IDirectMusicPort_AddRef
,
midi_IDirectMusicPort_Release
,
midi_IDirectMusicPort_PlayBuffer
,
midi_IDirectMusicPort_SetReadNotificationHandle
,
midi_IDirectMusicPort_Read
,
midi_IDirectMusicPort_DownloadInstrument
,
midi_IDirectMusicPort_UnloadInstrument
,
midi_IDirectMusicPort_GetLatencyClock
,
midi_IDirectMusicPort_GetRunningStats
,
midi_IDirectMusicPort_Compact
,
midi_IDirectMusicPort_GetCaps
,
midi_IDirectMusicPort_DeviceIoControl
,
midi_IDirectMusicPort_SetNumChannelGroups
,
midi_IDirectMusicPort_GetNumChannelGroups
,
midi_IDirectMusicPort_Activate
,
midi_IDirectMusicPort_SetChannelPriority
,
midi_IDirectMusicPort_GetChannelPriority
,
midi_IDirectMusicPort_SetDirectSound
,
midi_IDirectMusicPort_GetFormat
,
};
HRESULT
midi_out_port_create
(
IDirectMusic8Impl
*
parent
,
DMUS_PORTPARAMS
*
port_params
,
DMUS_PORTCAPS
*
port_caps
,
IDirectMusicPort
**
port
)
{
FIXME
(
"(%p, %p, %p): stub
\n
"
,
port_params
,
port_caps
,
port
)
;
struct
midi_port
*
obj
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %p, %p)
\n
"
,
port_params
,
port_caps
,
port
);
if
(
!
(
obj
=
heap_alloc_zero
(
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
obj
->
IDirectMusicPort_iface
.
lpVtbl
=
&
midi_port_vtbl
;
obj
->
ref
=
1
;
*
port
=
&
obj
->
IDirectMusicPort_iface
;
return
S_OK
;
}
HRESULT
midi_in_port_create
(
IDirectMusic8Impl
*
parent
,
DMUS_PORTPARAMS
*
port_params
,
...
...
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