Alistair Leslie-Hughes : xactengine3_7: Map SoundBank interfaces.

Alexandre Julliard julliard at winehq.org
Thu Aug 4 14:46:39 CDT 2022


Module: wine
Branch: master
Commit: 33831cfce7e9bc5e0bd9f6a0f9244ce73a6a6981
URL:    https://gitlab.winehq.org/wine/wine/-/commit/33831cfce7e9bc5e0bd9f6a0f9244ce73a6a6981

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Jul 22 09:57:22 2022 +1000

xactengine3_7: Map SoundBank interfaces.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>

---

 dlls/xactengine3_7/xact_dll.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 7500ab032de..5dc857513f8 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -346,6 +346,7 @@ typedef struct _XACT3SoundBankImpl {
     IXACT3SoundBank IXACT3SoundBank_iface;
 
     FACTSoundBank *fact_soundbank;
+    XACT3EngineImpl *engine;
 } XACT3SoundBankImpl;
 
 static inline XACT3SoundBankImpl *impl_from_IXACT3SoundBank(IXACT3SoundBank *iface)
@@ -482,6 +483,8 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Destroy(IXACT3SoundBank *iface)
     TRACE("(%p)\n", This);
 
     hr = FACTSoundBank_Destroy(This->fact_soundbank);
+
+    wrapper_remove_entry(This->engine, This->fact_soundbank);
     HeapFree(GetProcessHeap(), 0, This);
     return hr;
 }
@@ -1088,6 +1091,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
     XACT3SoundBankImpl *sb;
     FACTSoundBank *fsb;
     UINT ret;
+    HRESULT hr;
 
     TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
             dwAllocAttributes, ppSoundBank);
@@ -1108,8 +1112,17 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
         return E_OUTOFMEMORY;
     }
 
+    hr = wrapper_add_entry(This, fsb, &sb->IXACT3SoundBank_iface);
+    if (FAILED(hr))
+    {
+        FACTSoundBank_Destroy(fsb);
+        HeapFree(GetProcessHeap(), 0, sb);
+        return hr;
+    }
+
     sb->IXACT3SoundBank_iface.lpVtbl = &XACT3SoundBank_Vtbl;
     sb->fact_soundbank = fsb;
+    sb->engine = This;
     *ppSoundBank = &sb->IXACT3SoundBank_iface;
 
     TRACE("Created SoundBank: %p\n", sb);




More information about the wine-cvs mailing list