Alistair Leslie-Hughes : dmband: Semi-stub IDirectMusicBand CreateSegment.
Alexandre Julliard
julliard at winehq.org
Mon Sep 21 15:12:14 CDT 2020
Module: wine
Branch: master
Commit: 7bb9d62e7083a344d0fd03369ad69d999d11a1fe
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7bb9d62e7083a344d0fd03369ad69d999d11a1fe
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Fri Sep 18 22:42:17 2020 +0200
dmband: Semi-stub IDirectMusicBand CreateSegment.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dmband/band.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/dmband/band.c b/dlls/dmband/band.c
index 901f5a69ee..6f990afaf7 100644
--- a/dlls/dmband/band.c
+++ b/dlls/dmband/band.c
@@ -90,11 +90,27 @@ static ULONG WINAPI IDirectMusicBandImpl_Release(IDirectMusicBand *iface)
}
static HRESULT WINAPI IDirectMusicBandImpl_CreateSegment(IDirectMusicBand *iface,
- IDirectMusicSegment **ppSegment)
+ IDirectMusicSegment **segment)
{
- IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
- FIXME("(%p, %p): stub\n", This, ppSegment);
- return S_OK;
+ IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
+ HRESULT hr;
+ DMUS_BAND_PARAM bandparam;
+
+ FIXME("(%p, %p): semi-stub\n", This, segment);
+
+ hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC,
+ &IID_IDirectMusicSegment, (void**)segment);
+ if (FAILED(hr))
+ return hr;
+
+ bandparam.mtTimePhysical = 0;
+ bandparam.pBand = &This->IDirectMusicBand_iface;
+ IDirectMusicBand_AddRef(bandparam.pBand);
+ hr = IDirectMusicSegment_SetParam(*segment, &GUID_BandParam, 0xffffffff, DMUS_SEG_ALLTRACKS,
+ 0, &bandparam);
+ IDirectMusicBand_Release(bandparam.pBand);
+
+ return hr;
}
static HRESULT WINAPI IDirectMusicBandImpl_Download(IDirectMusicBand *iface,
More information about the wine-cvs
mailing list