From 64b6d08cab7e3dba743997844a3f0a095080577c Mon Sep 17 00:00:00 2001 From: avolkov Date: Thu, 6 Feb 2003 16:46:57 +0000 Subject: [PATCH] Minor cleanup and warning removal git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@699 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c | 1 + sc2/src/sc2code/libs/sound/openal/sound_openal.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c index 889d93586..13cfb34c3 100644 --- a/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c +++ b/sc2/src/sc2code/libs/sound/mixsdl/sound_mixsdl.c @@ -288,6 +288,7 @@ NoSound_PlaybackTaskFunc (void *data) SDL_Delay (delay); } + HFree (stream); FinishTask (task); return 0; } diff --git a/sc2/src/sc2code/libs/sound/openal/sound_openal.c b/sc2/src/sc2code/libs/sound/openal/sound_openal.c index 7b94c1c8a..0d8f8021a 100644 --- a/sc2/src/sc2code/libs/sound/openal/sound_openal.c +++ b/sc2/src/sc2code/libs/sound/openal/sound_openal.c @@ -105,6 +105,8 @@ TFB_alInitSound (int driver, int flags) StreamDecoderTask = AssignTask (StreamDecoderTaskFunc, 1024, "audio stream decoder"); + (void) driver; // eat compiler warning + return 0; } @@ -113,7 +115,11 @@ TFB_alUninitSound (void) { int i; - ConcludeTask (StreamDecoderTask); + if (StreamDecoderTask) + { + ConcludeTask (StreamDecoderTask); + StreamDecoderTask = NULL; + } for (i = 0; i < NUM_SOUNDSOURCES; ++i) {