[PATCH 1/2] dmband: Semi-stub IDirectMusicBand CreateSegment
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Fri Sep 18 02:55:26 CDT 2020
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/dmband/band.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/dlls/dmband/band.c b/dlls/dmband/band.c
index 901f5a69ee..c0268f439e 100644
--- a/dlls/dmband/band.c
+++ b/dlls/dmband/band.c
@@ -92,9 +92,25 @@ static ULONG WINAPI IDirectMusicBandImpl_Release(IDirectMusicBand *iface)
static HRESULT WINAPI IDirectMusicBandImpl_CreateSegment(IDirectMusicBand *iface,
IDirectMusicSegment **ppSegment)
{
- 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): stub\n", This, ppSegment);
+
+ hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC,
+ &IID_IDirectMusicSegment, (void**)ppSegment);
+ if (FAILED(hr))
+ return hr;
+
+ bandparam.mtTimePhysical = 0;
+ bandparam.pBand = &This->IDirectMusicBand_iface;
+ IDirectMusicBand_AddRef(bandparam.pBand);
+ hr = IDirectMusicSegment_SetParam(*ppSegment, &GUID_BandParam, 0xffffffff, DMUS_SEG_ALLTRACKS,
+ 0, &bandparam);
+ IDirectMusicBand_Release(bandparam.pBand);
+
+ return hr;
}
static HRESULT WINAPI IDirectMusicBandImpl_Download(IDirectMusicBand *iface,
--
2.28.0
More information about the wine-devel
mailing list