SDL_FreeWAV

What SDL_FreeWAV really doing?
Is it necessary to do free( data ) or it is enough to do SDL_FreeWAV( data
)?–
Regards,
Igor Mironchick,
Intervale ©
#ICQ 492-597-570

Hello !

Is it necessary to do free( data ) or it is enough to do SDL_FreeWAV( data
)?

You should do SDL_FreeWAV (data);

It is safer than free (data);

From the SDL-1.2 Source :

/* Since the WAV memory is allocated in the shared library, it must also
be freed here. (Necessary under Win32, VC++)
*/
void SDL_FreeWAV(Uint8 *audio_buf)
{
if ( audio_buf != NULL ) {
SDL_free(audio_buf);
}
}

CU