FAudio doesn't always return a valid HRESULT, ensure a valid code is passed back to the application.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/xactengine3_7/xact_dll.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index 3a14db7460..69570e8cef 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -157,6 +157,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface, { XACT3EngineImpl *This = impl_from_IXACT3Engine(iface); FACTRuntimeParameters params; + UINT ret;
TRACE("(%p)->(%p)\n", This, pParams);
@@ -195,7 +196,11 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface, params.fileIOCallbacks.readFileCallback = wrap_readfile; params.fileIOCallbacks.getOverlappedResultCallback = wrap_getoverlappedresult;
- return FACTAudioEngine_Initialize(This->fact_engine, ¶ms); + ret = FACTAudioEngine_Initialize(This->fact_engine, ¶ms); + if (ret != 0) + WARN("FACTAudioEngine_Initialize returned %d\n", ret); + + return !ret ? S_OK : E_FAIL; }
static HRESULT WINAPI IXACT3EngineImpl_ShutDown(IXACT3Engine *iface)