xactengine3_7: Implement IXACT3Engine PrepareWave.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49689
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2021-02-05 16:19:44 +11:00 committed by Alexandre Julliard
parent ea3096bdab
commit 5626c163db
1 changed files with 29 additions and 2 deletions

View File

@ -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 {