Commit d7c5f1a9 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

dsound/tests: Replace malloc() with HeapAlloc().

parent 9cfc021b
......@@ -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 */
......
......@@ -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 */
......
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