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

This commit is contained in:
Francois Gouget 2009-05-13 10:32:21 +02:00 committed by Alexandre Julliard
parent 9cfc021b1a
commit d7c5f1a90b
2 changed files with 3 additions and 3 deletions

View File

@ -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 */

View File

@ -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 */