dmusic: Support midi in ports too.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-08-20 00:01:36 +02:00 committed by Alexandre Julliard
parent 25dcca4b30
commit fcedc2b920
1 changed files with 14 additions and 8 deletions

View File

@ -1126,14 +1126,12 @@ static const IDirectMusicPortVtbl midi_port_vtbl = {
midi_IDirectMusicPort_GetFormat,
};
HRESULT midi_out_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params,
DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
HRESULT midi_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps,
IDirectMusicPort **port)
{
struct midi_port *obj;
HRESULT hr;
TRACE("(%p, %p, %p)\n", port_params, port_caps, port);
if (!(obj = heap_alloc_zero(sizeof(*obj))))
return E_OUTOFMEMORY;
@ -1151,10 +1149,18 @@ HRESULT midi_out_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_pa
return S_OK;
}
HRESULT midi_in_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params,
DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
HRESULT midi_out_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params,
DMUS_PORTCAPS *caps, IDirectMusicPort **port)
{
FIXME("(%p, %p, %p): stub\n", port_params, port_caps, port);
TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
return E_NOTIMPL;
return midi_port_create(parent, params, caps, port);
}
HRESULT midi_in_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params,
DMUS_PORTCAPS *caps, IDirectMusicPort **port)
{
TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
return midi_port_create(parent, params, caps, port);
}