dsound/tests: Replace malloc() with HeapAlloc().
Francois Gouget
fgouget at free.fr
Wed May 13 03:32:21 CDT 2009
---
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 */
--
1.6.2.1
More information about the wine-patches
mailing list