xaudio2/tests: Fix memory leaks.

Spotted by Nikolay Sivov.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2015-10-30 08:55:39 -05:00 committed by Alexandre Julliard
parent 4a4efc3506
commit 23a0c7f677
1 changed files with 7 additions and 0 deletions

View File

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