mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[DMUSIC] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73255
This commit is contained in:
parent
a5b9d1f8e8
commit
22687f1551
5 changed files with 63 additions and 75 deletions
|
@ -136,7 +136,7 @@ HRESULT DMUSIC_CreateReferenceClockImpl(LPCGUID riid, LPVOID* ret_iface, LPUNKNO
|
|||
|
||||
DMUSIC_LockModule();
|
||||
hr = IReferenceClockImpl_QueryInterface(&clock->IReferenceClock_iface, riid, ret_iface);
|
||||
IReferenceClockImpl_Release(&clock->IReferenceClock_iface);
|
||||
IReferenceClock_Release(&clock->IReferenceClock_iface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -428,7 +428,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl(LPCGUID riid, LPVOID* ret_iface, LPU
|
|||
|
||||
DMUSIC_LockModule();
|
||||
ret = IDirectMusic8Impl_QueryInterface(&dmusic->IDirectMusic8_iface, riid, ret_iface);
|
||||
IDirectMusic8Impl_Release(&dmusic->IDirectMusic8_iface);
|
||||
IDirectMusic8_Release(&dmusic->IDirectMusic8_iface);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -58,8 +58,6 @@ typedef struct IReferenceClockImpl IReferenceClockImpl;
|
|||
|
||||
typedef struct IDirectMusicInstrumentImpl IDirectMusicInstrumentImpl;
|
||||
|
||||
typedef struct SynthPortImpl SynthPortImpl;
|
||||
|
||||
/*****************************************************************************
|
||||
* Some stuff to make my life easier :=)
|
||||
*/
|
||||
|
@ -164,29 +162,6 @@ struct IDirectMusicDownloadImpl {
|
|||
/* IDirectMusicDownloadImpl fields */
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* SynthPortImpl implementation structure
|
||||
*/
|
||||
struct SynthPortImpl {
|
||||
/* IUnknown fields */
|
||||
IDirectMusicPort IDirectMusicPort_iface;
|
||||
IDirectMusicPortDownload IDirectMusicPortDownload_iface;
|
||||
IDirectMusicThru IDirectMusicThru_iface;
|
||||
IKsControl IKsControl_iface;
|
||||
LONG ref;
|
||||
|
||||
/* IDirectMusicPort fields */
|
||||
IDirectSound* pDirectSound;
|
||||
IReferenceClock* pLatencyClock;
|
||||
IDirectMusicSynth* synth;
|
||||
IDirectMusicSynthSink* synth_sink;
|
||||
BOOL fActive;
|
||||
DMUS_PORTCAPS caps;
|
||||
DMUS_PORTPARAMS params;
|
||||
int nrofgroups;
|
||||
DMUSIC_PRIVATE_CHANNEL_GROUP group[1];
|
||||
};
|
||||
|
||||
/** Internal factory */
|
||||
extern HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device) DECLSPEC_HIDDEN;
|
||||
extern HRESULT DMUSIC_CreateMidiOutPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -23,6 +23,23 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
typedef struct SynthPortImpl {
|
||||
IDirectMusicPort IDirectMusicPort_iface;
|
||||
IDirectMusicPortDownload IDirectMusicPortDownload_iface;
|
||||
IDirectMusicThru IDirectMusicThru_iface;
|
||||
IKsControl IKsControl_iface;
|
||||
LONG ref;
|
||||
IDirectSound *pDirectSound;
|
||||
IReferenceClock *pLatencyClock;
|
||||
IDirectMusicSynth *synth;
|
||||
IDirectMusicSynthSink *synth_sink;
|
||||
BOOL fActive;
|
||||
DMUS_PORTCAPS caps;
|
||||
DMUS_PORTPARAMS params;
|
||||
int nrofgroups;
|
||||
DMUSIC_PRIVATE_CHANNEL_GROUP group[1];
|
||||
} SynthPortImpl;
|
||||
|
||||
static inline IDirectMusicDownloadedInstrumentImpl* impl_from_IDirectMusicDownloadedInstrument(IDirectMusicDownloadedInstrument *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, IDirectMusicDownloadedInstrumentImpl, IDirectMusicDownloadedInstrument_iface);
|
||||
|
@ -43,7 +60,7 @@ static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicThru(IDirectMus
|
|||
return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicThru_iface);
|
||||
}
|
||||
|
||||
static inline SynthPortImpl *impl_from_SynthPortImpl_IKsControl(IKsControl *iface)
|
||||
static inline SynthPortImpl *impl_from_IKsControl(IKsControl *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, SynthPortImpl, IKsControl_iface);
|
||||
}
|
||||
|
@ -134,27 +151,23 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSI
|
|||
|
||||
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
|
||||
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) {
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort))
|
||||
*ret_iface = &This->IDirectMusicPort_iface;
|
||||
IDirectMusicPort_AddRef((LPDIRECTMUSICPORT)*ret_iface);
|
||||
return S_OK;
|
||||
} else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
|
||||
else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload))
|
||||
*ret_iface = &This->IDirectMusicPortDownload_iface;
|
||||
IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ret_iface);
|
||||
return S_OK;
|
||||
} else if (IsEqualGUID(riid, &IID_IDirectMusicThru)) {
|
||||
else if (IsEqualGUID(riid, &IID_IDirectMusicThru))
|
||||
*ret_iface = &This->IDirectMusicThru_iface;
|
||||
IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ret_iface);
|
||||
return S_OK;
|
||||
} else if (IsEqualGUID(riid, &IID_IKsControl)) {
|
||||
else if (IsEqualGUID(riid, &IID_IKsControl))
|
||||
*ret_iface = &This->IKsControl_iface;
|
||||
IKsControl_AddRef((IKsControl*)*ret_iface);
|
||||
return S_OK;
|
||||
else {
|
||||
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
|
||||
*ret_iface = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
|
||||
IUnknown_AddRef((IUnknown*)*ret_iface);
|
||||
|
||||
return E_NOINTERFACE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)
|
||||
|
@ -680,73 +693,73 @@ static const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl = {
|
|||
SynthPortImpl_IDirectMusicThru_ThruChannel
|
||||
};
|
||||
|
||||
static HRESULT WINAPI SynthPortImpl_IKsControl_QueryInterface(IKsControl* iface, REFIID riid, LPVOID *ppobj)
|
||||
static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface, REFIID riid,
|
||||
void **ret_iface)
|
||||
{
|
||||
SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface);
|
||||
SynthPortImpl *This = impl_from_IKsControl(iface);
|
||||
|
||||
return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ppobj);
|
||||
return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SynthPortImpl_IKsControl_AddRef(IKsControl* iface)
|
||||
static ULONG WINAPI IKsControlImpl_AddRef(IKsControl *iface)
|
||||
{
|
||||
SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface);
|
||||
SynthPortImpl *This = impl_from_IKsControl(iface);
|
||||
|
||||
return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI SynthPortImpl_IKsControl_Release(IKsControl* iface)
|
||||
static ULONG WINAPI IKsControlImpl_Release(IKsControl *iface)
|
||||
{
|
||||
SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface);
|
||||
SynthPortImpl *This = impl_from_IKsControl(iface);
|
||||
|
||||
return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SynthPortImpl_IKsControl_KsProperty(IKsControl* iface, PKSPROPERTY Property, ULONG PropertyLength, LPVOID PropertyData,
|
||||
ULONG DataLength, ULONG* BytesReturned)
|
||||
static HRESULT WINAPI IKsControlImpl_KsProperty(IKsControl *iface, KSPROPERTY *prop,
|
||||
ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len)
|
||||
{
|
||||
TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, Property, PropertyLength, PropertyData, DataLength, BytesReturned);
|
||||
TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, prop, prop_len, data, data_len, ret_len);
|
||||
TRACE("prop = %s - %u - %u\n", debugstr_guid(&prop->Set), prop->Id, prop->Flags);
|
||||
|
||||
TRACE("Property = %s - %u - %u\n", debugstr_guid(&Property->Set), Property->Id, Property->Flags);
|
||||
|
||||
if (Property->Flags != KSPROPERTY_TYPE_GET)
|
||||
if (prop->Flags != KSPROPERTY_TYPE_GET)
|
||||
{
|
||||
FIXME("Property flags %u not yet supported\n", Property->Flags);
|
||||
FIXME("prop flags %u not yet supported\n", prop->Flags);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
if (DataLength < sizeof(DWORD))
|
||||
if (data_len < sizeof(DWORD))
|
||||
return E_NOT_SUFFICIENT_BUFFER;
|
||||
|
||||
FIXME("Unknown property %s\n", debugstr_guid(&Property->Set));
|
||||
*(DWORD*)PropertyData = FALSE;
|
||||
*BytesReturned = sizeof(DWORD);
|
||||
FIXME("Unknown property %s\n", debugstr_guid(&prop->Set));
|
||||
*(DWORD*)data = FALSE;
|
||||
*ret_len = sizeof(DWORD);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SynthPortImpl_IKsControl_KsMethod(IKsControl* iface, PKSMETHOD Method, ULONG MethodLength, LPVOID MethodData,
|
||||
ULONG DataLength, ULONG* BytesReturned)
|
||||
static HRESULT WINAPI IKsControlImpl_KsMethod(IKsControl *iface, KSMETHOD *method,
|
||||
ULONG method_len, void *data, ULONG data_len, ULONG *ret_len)
|
||||
{
|
||||
FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, Method, MethodLength, MethodData, DataLength, BytesReturned);
|
||||
FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, method, method_len, data, data_len, ret_len);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI SynthPortImpl_IKsControl_KsEvent(IKsControl* iface, PKSEVENT Event, ULONG EventLength, LPVOID EventData,
|
||||
ULONG DataLength, ULONG* BytesReturned)
|
||||
static HRESULT WINAPI IKsControlImpl_KsEvent(IKsControl *iface, KSEVENT *event, ULONG event_len,
|
||||
void *data, ULONG data_len, ULONG *ret_len)
|
||||
{
|
||||
FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, Event, EventLength, EventData, DataLength, BytesReturned);
|
||||
FIXME("(%p)->(%p, %u, %p, %u, %p): stub\n", iface, event, event_len, data, data_len, ret_len);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IKsControlVtbl SynthPortImpl_IKsControl_Vtbl = {
|
||||
SynthPortImpl_IKsControl_QueryInterface,
|
||||
SynthPortImpl_IKsControl_AddRef,
|
||||
SynthPortImpl_IKsControl_Release,
|
||||
SynthPortImpl_IKsControl_KsProperty,
|
||||
SynthPortImpl_IKsControl_KsMethod,
|
||||
SynthPortImpl_IKsControl_KsEvent
|
||||
static const IKsControlVtbl ikscontrol_vtbl = {
|
||||
IKsControlImpl_QueryInterface,
|
||||
IKsControlImpl_AddRef,
|
||||
IKsControlImpl_Release,
|
||||
IKsControlImpl_KsProperty,
|
||||
IKsControlImpl_KsMethod,
|
||||
IKsControlImpl_KsEvent
|
||||
};
|
||||
|
||||
HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device)
|
||||
|
@ -767,7 +780,7 @@ HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkou
|
|||
obj->IDirectMusicPort_iface.lpVtbl = &SynthPortImpl_DirectMusicPort_Vtbl;
|
||||
obj->IDirectMusicPortDownload_iface.lpVtbl = &SynthPortImpl_DirectMusicPortDownload_Vtbl;
|
||||
obj->IDirectMusicThru_iface.lpVtbl = &SynthPortImpl_DirectMusicThru_Vtbl;
|
||||
obj->IKsControl_iface.lpVtbl = &SynthPortImpl_IKsControl_Vtbl;
|
||||
obj->IKsControl_iface.lpVtbl = &ikscontrol_vtbl;
|
||||
obj->ref = 0; /* Will be inited by QueryInterface */
|
||||
obj->fActive = FALSE;
|
||||
obj->params = *port_params;
|
||||
|
|
|
@ -32,7 +32,7 @@ reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.9.4
|
|||
reactos/dll/directx/wine/devenum # Synced to WineStaging-1.9.16
|
||||
reactos/dll/directx/wine/dinput # Synced to WineStaging-1.9.23
|
||||
reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.9.11
|
||||
reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.16
|
||||
reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.23
|
||||
reactos/dll/directx/wine/dplay # Synced to WineStaging-1.9.11
|
||||
reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.9.16
|
||||
reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
|
||||
|
|
Loading…
Reference in a new issue