Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/xactengine3_7/xact_dll.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index 742fe86cc9..aa16f062f5 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -273,7 +273,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface, XACT3SoundBankImpl *This = impl_from_IXACT3SoundBank(iface); XACT3CueImpl *cue; FACTCue *fcue; - HRESULT hr; + UINT ret;
TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset, ppCue); @@ -283,13 +283,13 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface, * -flibit */ if (ppCue == NULL){ - hr = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags, + ret = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags, timeOffset, NULL); }else{ - hr = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags, + ret = FACTSoundBank_Play(This->fact_soundbank, nCueIndex, dwFlags, timeOffset, &fcue); - if(FAILED(hr)) - return hr; + if(ret != 0) + goto done;
cue = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cue)); if (!cue) @@ -304,7 +304,11 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface, *ppCue = (IXACT3Cue*)&cue->IXACT3Cue_iface; }
- return hr; +done: + if(ret != 0) + WARN("FACTSoundBank_Play returned %d\n", ret); + + return !ret ? S_OK : E_FAIL; }
static HRESULT WINAPI IXACT3SoundBankImpl_Stop(IXACT3SoundBank *iface,