I've already sent them once, some feedback would be appreciated.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/xactengine3_7/xact_dll.c | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index 8b9ee33ab5c..913cabe1e48 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -985,8 +985,58 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareStreamingWave(IXACT3Engine *iface, IXACT3Wave **ppWave) { XACT3EngineImpl *This = impl_from_IXACT3Engine(iface); - FIXME("(%p): stub!\n", This); - return E_NOTIMPL; + XACT3WaveImpl *wave; + FACTWave *fwave = NULL; + FACTStreamingParameters fakeParms; + wrap_readfile_struct *fake; + FACTWaveBankEntry fact_wavebank; + UINT ret; + + TRACE("(%p)->(0x%08x, %p, %p, %d, %p, %d, %d, %p)\n", This, dwFlags, &entry, &streamingParams, + dwAlignment, pdwSeekTable, dwPlayOffset, nLoopCount, ppWave); + + fake = (wrap_readfile_struct*) CoTaskMemAlloc( + sizeof(wrap_readfile_struct)); + fake->engine = This; + fake->file = streamingParams.file; + fakeParms.file = fake; + fakeParms.flags = streamingParams.flags; + fakeParms.offset = streamingParams.offset; + fakeParms.packetSize = streamingParams.packetSize; + + fact_wavebank.dwFlagsAndDuration = entry.u.dwFlagsAndDuration; + fact_wavebank.Format.dwValue = entry.Format.dwValue; + fact_wavebank.PlayRegion.dwOffset = entry.PlayRegion.dwOffset; + fact_wavebank.PlayRegion.dwLength = entry.PlayRegion.dwLength; + fact_wavebank.LoopRegion.dwStartSample = entry.LoopRegion.dwStartSample; + fact_wavebank.LoopRegion.dwTotalSamples = entry.LoopRegion.dwTotalSamples; + + /* FAudio Prototype is incorrect and shouldn't take a buffer as an parameter, + * passing through NULL to ensure it's not used. + */ + ret = FACTAudioEngine_PrepareStreamingWave(This->fact_engine, dwFlags, fact_wavebank, fakeParms, + dwAlignment, pdwSeekTable, NULL, dwPlayOffset, nLoopCount, &fwave); + + if(ret != 0 || !fwave) + { + ERR("Failed to create a wave: %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; }
static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92915
Your paranoid android.
=== debiant2 (build log) ===
../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ Task: The win32 Wine build failed
=== debiant2 (build log) ===
../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ ../wine/dlls/xactengine3_7/xact_dll.c:1088:45: error: ‘WAVEBANKENTRY’ has no member named ‘u’ Task: The wow64 Wine build failed