Module: wine Branch: master Commit: d7c5f1a90be0d38247766bfd642533d40c1c0a1e URL: http://source.winehq.org/git/wine.git/?a=commit;h=d7c5f1a90be0d38247766bfd64...
Author: Francois Gouget fgouget@free.fr Date: Wed May 13 10:32:21 2009 +0200
dsound/tests: Replace malloc() with HeapAlloc().
---
dlls/dsound/tests/ds3d.c | 4 ++-- dlls/dsound/tests/ds3d8.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 8f5b88a..71ff2ab 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -48,7 +48,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size)
nb_samples=(int)(duration*wfx->nSamplesPerSec); *size=nb_samples*wfx->nBlockAlign; - b=buf=malloc(*size); + b=buf=HeapAlloc(GetProcessHeap(), 0, *size); for (i=0;i<nb_samples;i++) { double y=sin(440.0*2*PI*i/wfx->nSamplesPerSec); if (wfx->wBitsPerSample==8) { @@ -674,7 +674,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, "The sound played for %d ms instead of %g ms\n", now-start_time,1000*duration);
- free(state.wave); + HeapFree(GetProcessHeap(), 0, state.wave); if (is_primary) { /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 1f5f28a..9dfdd31 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -518,7 +518,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, "The sound played for %d ms instead of %g ms\n", now-start_time,1000*duration);
- free(state.wave); + HeapFree(GetProcessHeap(), 0, state.wave); if (is_primary) { /* Set the CooperativeLevel back to normal */ /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */