X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=snd_wav.c;h=d23a8b5126487ca3b01196c8c5c17ffc61492565;hp=6f861913335007bb2f155a68aa5b672c16cdaaee;hb=6536be64bd178fe115a12c60296b0b5d8b2ca828;hpb=e25e94b0f38884e38eb25b5c2a2c59084af68800 diff --git a/snd_wav.c b/snd_wav.c index 6f861913..d23a8b51 100644 --- a/snd_wav.c +++ b/snd_wav.c @@ -22,10 +22,10 @@ */ -#include "quakedef.h" +#include "darkplaces.h" #include "snd_main.h" #include "snd_wav.h" - +#include "sound.h" typedef struct wavinfo_s { @@ -265,7 +265,7 @@ const snd_fetcher_t wav_fetcher = { WAV_GetSamplesFloat, NULL, WAV_FreeSfx }; S_LoadWavFile ============== */ -qboolean S_LoadWavFile (const char *filename, sfx_t *sfx) +qbool S_LoadWavFile (const char *filename, sfx_t *sfx) { fs_offset_t filesize; unsigned char *data; @@ -344,5 +344,6 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *sfx) sfx->loopstart = min(sfx->loopstart, sfx->total_length); sfx->flags &= ~SFXFLAG_STREAMED; + Mem_Free(data); // we already got a copy of this in fetcher_data return true; }