Author: akhaldi
Date: Sat Jul 2 15:40:22 2016
New Revision: 71760
URL:
http://svn.reactos.org/svn/reactos?rev=71760&view=rev
Log:
[DMUSIC] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/reactos/dll/directx/wine/dmusic/buffer.c
trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h
trunk/reactos/dll/directx/wine/dmusic/port.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/dmusic/buffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/bu…
==============================================================================
--- trunk/reactos/dll/directx/wine/dmusic/buffer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dmusic/buffer.c [iso-8859-1] Sat Jul 2 15:40:22 2016
@@ -132,8 +132,25 @@
static HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured(LPDIRECTMUSICBUFFER iface,
REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb)
{
IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface);
+ DWORD new_write_pos = This->write_pos + sizeof(DMUS_EVENTHEADER) + cb;
+ DMUS_EVENTHEADER header;
FIXME("(%p, 0x%s, %d, %d, %p): stub\n", This, wine_dbgstr_longlong(rt),
dwChannelGroup, cb, lpb);
+
+ if (new_write_pos > This->size)
+ return DMUS_E_BUFFER_FULL;
+
+ if (!This->write_pos)
+ This->start_time = rt;
+
+ header.cbEvent = cb;
+ header.dwChannelGroup = dwChannelGroup;
+ header.rtDelta = rt - This->start_time;
+ header.dwFlags = 0;
+
+ memcpy(This->data + This->write_pos, &header, sizeof(header));
+ memcpy(This->data + This->write_pos + sizeof(header), lpb, cb);
+ This->write_pos = new_write_pos;
return S_OK;
}
Modified: trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/dm…
==============================================================================
--- trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dmusic/dmusic_private.h [iso-8859-1] Sat Jul 2
15:40:22 2016
@@ -37,6 +37,7 @@
#include <objbase.h>
#include <dmusici.h>
#include <dmusics.h>
+#include <dmksctrl.h>
#include <wine/debug.h>
#include <wine/list.h>
@@ -171,6 +172,7 @@
IDirectMusicPort IDirectMusicPort_iface;
IDirectMusicPortDownload IDirectMusicPortDownload_iface;
IDirectMusicThru IDirectMusicThru_iface;
+ IKsControl IKsControl_iface;
LONG ref;
/* IDirectMusicPort fields */
Modified: trunk/reactos/dll/directx/wine/dmusic/port.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dmusic/po…
==============================================================================
--- trunk/reactos/dll/directx/wine/dmusic/port.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dmusic/port.c [iso-8859-1] Sat Jul 2 15:40:22 2016
@@ -43,6 +43,11 @@
return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicThru_iface);
}
+static inline SynthPortImpl *impl_from_SynthPortImpl_IKsControl(IKsControl *iface)
+{
+ return CONTAINING_RECORD(iface, SynthPortImpl, IKsControl_iface);
+}
+
/* IDirectMusicDownloadedInstrument IUnknown part follows: */
static HRESULT WINAPI
IDirectMusicDownloadedInstrumentImpl_QueryInterface(IDirectMusicDownloadedInstrument
*iface, REFIID riid, VOID **ret_iface)
{
@@ -140,6 +145,10 @@
} 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)) {
+ *ret_iface = &This->IKsControl_iface;
+ IKsControl_AddRef((IKsControl*)*ret_iface);
return S_OK;
}
@@ -671,6 +680,75 @@
SynthPortImpl_IDirectMusicThru_ThruChannel
};
+static HRESULT WINAPI SynthPortImpl_IKsControl_QueryInterface(IKsControl* iface, REFIID
riid, LPVOID *ppobj)
+{
+ SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface);
+
+ return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid,
ppobj);
+}
+
+static ULONG WINAPI SynthPortImpl_IKsControl_AddRef(IKsControl* iface)
+{
+ SynthPortImpl *This = impl_from_SynthPortImpl_IKsControl(iface);
+
+ return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
+}
+
+static ULONG WINAPI SynthPortImpl_IKsControl_Release(IKsControl* iface)
+{
+ SynthPortImpl *This = impl_from_SynthPortImpl_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)
+{
+ TRACE("(%p)->(%p, %u, %p, %u, %p)\n", iface, Property, PropertyLength,
PropertyData, DataLength, BytesReturned);
+
+ TRACE("Property = %s - %u - %u\n", debugstr_guid(&Property->Set),
Property->Id, Property->Flags);
+
+ if (Property->Flags != KSPROPERTY_TYPE_GET)
+ {
+ FIXME("Property flags %u not yet supported\n", Property->Flags);
+ return S_FALSE;
+ }
+
+ if (DataLength < sizeof(DWORD))
+ return E_NOT_SUFFICIENT_BUFFER;
+
+ FIXME("Unknown property %s\n", debugstr_guid(&Property->Set));
+ *(DWORD*)PropertyData = FALSE;
+ *BytesReturned = sizeof(DWORD);
+
+ return S_OK;
+}
+
+static HRESULT WINAPI SynthPortImpl_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 SynthPortImpl_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 SynthPortImpl_IKsControl_Vtbl = {
+ SynthPortImpl_IKsControl_QueryInterface,
+ SynthPortImpl_IKsControl_AddRef,
+ SynthPortImpl_IKsControl_Release,
+ SynthPortImpl_IKsControl_KsProperty,
+ SynthPortImpl_IKsControl_KsMethod,
+ SynthPortImpl_IKsControl_KsEvent
+};
+
HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter,
LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device)
{
SynthPortImpl *obj;
@@ -688,6 +766,7 @@
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->ref = 0; /* Will be inited by QueryInterface */
obj->fActive = FALSE;
obj->params = *port_params;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jul 2 15:40:22 2016
@@ -32,7 +32,7 @@
reactos/dll/directx/wine/devenum # Synced to WineStaging-1.9.11
reactos/dll/directx/wine/dinput # Synced to WineStaging-1.9.11
reactos/dll/directx/wine/dinput8 # Synced to WineStaging-1.9.4
-reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.4
+reactos/dll/directx/wine/dmusic # Synced to WineStaging-1.9.11
reactos/dll/directx/wine/dplay # Synced to WineStaging-1.9.4
reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.9.4
reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29