Commit 23a0c7f6 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

xaudio2/tests: Fix memory leaks.

Spotted by Nikolay Sivov. Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4a4efc35
......@@ -766,6 +766,13 @@ static void test_looping(IXAudio2 *xa)
ok(played - running_total == 22050 + 44100 * 2, "Got wrong samples played: %u\n", played - running_total);
ok(nloopends == (played - running_total) / 88200 + 1, "Got wrong OnLoopEnd calls: %u\n", nloopends);
running_total = played;
if(xaudio27)
IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src);
else
IXAudio2SourceVoice_DestroyVoice(src);
IXAudio2MasteringVoice_DestroyVoice(master);
HeapFree(GetProcessHeap(), 0, (void*)buf.pAudioData);
}
static UINT32 test_DeviceDetails(IXAudio27 *xa)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment