[PATCH] xactengine3_7: Implement IXACT3Engine PrepareWave
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Fri Aug 14 04:34:19 CDT 2020
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=49689
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/xactengine3_7/xact_dll.c | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index c5f96decb72..7189bd27b59 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -986,8 +986,36 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
IXACT3Wave **ppWave)
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
- FIXME("(%p): stub!\n", This);
- return E_NOTIMPL;
+ XACT3WaveImpl *wave;
+ FACTWave *fwave;
+ UINT ret;
+
+ TRACE("(%p)->(0x%08x, %s, %d, %d, %d, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
+ wStreamingPacketSize, dwAlignment, dwPlayOffset, nLoopCount, ppWave);
+
+ ret = FACTAudioEngine_PrepareWave(This->fact_engine, dwFlags, szWavePath, wStreamingPacketSize,
+ dwAlignment, dwPlayOffset, nLoopCount, &fwave);
+ if(ret != 0)
+ {
+ ERR("Failed to CreateWave: %d\n", ret);
+ return E_FAIL;
+ }
+
+ wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
+ if (!wave)
+ {
+ FACTWave_Destroy(fwave);
+ ERR("Failed to allocate XACT3WaveImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
+ wave->fact_wave = fwave;
+ *ppWave = &wave->IXACT3Wave_iface;
+
+ TRACE("Created Wave: %p\n", wave);
+
+ return S_OK;
}
enum {
--
2.28.0
More information about the wine-devel
mailing list