Alistair Leslie-Hughes : xactengine3_7: Implement IXACT3Engine PrepareWave.

Alexandre Julliard julliard at winehq.org
Thu Feb 18 16:06:07 CST 2021


Module: wine
Branch: master
Commit: 5626c163db492a2cb0412c3f54b2a26b2de0170b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5626c163db492a2cb0412c3f54b2a26b2de0170b

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Feb  5 16:19:44 2021 +1100

xactengine3_7: Implement IXACT3Engine PrepareWave.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49689
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xactengine3_7/xact_dll.c | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 281aecc154b..8b9ee33ab5c 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -995,8 +995,35 @@ 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 = NULL;
+    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 || !fwave)
+    {
+        ERR("Failed to CreateWave: %d (%p)\n", ret, fwave);
+        return E_FAIL;
+    }
+
+    wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
+    if (!wave)
+    {
+        FACTWave_Destroy(fwave);
+        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 {




More information about the wine-cvs mailing list