Christian Costa : dmusic: Implement SynthPortImpl_IDirectMusicPort_PlayBuffer.
Alexandre Julliard
julliard at winehq.org
Thu Sep 20 15:05:36 CDT 2012
Module: wine
Branch: master
Commit: b8aadbfbd9d1d50de9c606ccd0dabf11f5666173
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8aadbfbd9d1d50de9c606ccd0dabf11f5666173
Author: Christian Costa <titan.costa at gmail.com>
Date: Thu Sep 20 00:17:20 2012 +0200
dmusic: Implement SynthPortImpl_IDirectMusicPort_PlayBuffer.
---
dlls/dmusic/port.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c
index a611641..5a7776a 100644
--- a/dlls/dmusic/port.c
+++ b/dlls/dmusic/port.c
@@ -104,10 +104,28 @@ static ULONG WINAPI SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT ifa
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
{
SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
+ HRESULT hr;
+ REFERENCE_TIME time;
+ LPBYTE data;
+ DWORD size;
- FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
+ TRACE("(%p/%p)->(%p)\n", iface, This, buffer);
- return S_OK;
+ if (!buffer)
+ return E_POINTER;
+
+ hr = IDirectMusicBuffer_GetStartTime(buffer, &time);
+
+ if (SUCCEEDED(hr))
+ hr = IDirectMusicBuffer_GetRawBufferPtr(buffer, &data);
+
+ if (SUCCEEDED(hr))
+ hr = IDirectMusicBuffer_GetUsedBytes(buffer, &size);
+
+ if (SUCCEEDED(hr))
+ hr = IDirectMusicSynth_PlayBuffer(This->synth, time, data, size);
+
+ return hr;
}
static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(LPDIRECTMUSICPORT iface, HANDLE event)
More information about the wine-cvs
mailing list