On 2/19/21 11:58 AM, Alistair Leslie-Hughes wrote:
- TRACE("(%p)->(0x%08x, %p, %p, %d, %p, %d, %d, %p)\n", This, dwFlags, &entry, &streamingParams,
dwAlignment, pdwSeekTable, dwPlayOffset, nLoopCount, ppWave);
Is it useful to trace pointers to structures passed by value?
- /* 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 CreateWave: %d (%p)\n", ret, fwave);
return E_FAIL;
- }
Should it say "Failed to PrepareStreamingWave" or "Failed to create a wave" ?
- wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
- if (!wave)
- {
FACTWave_Destroy(fwave);
ERR("Failed to allocate XACT3WaveImpl!");
return E_OUTOFMEMORY;
- }
Tracing this seems redundant.