From 311b85a11d01f4cd94fdb563ad111403fd0009f2 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 10 Jan 2006 14:51:12 +0000 Subject: [PATCH] Small change to avoid dangling audio resources. --- src/Sound/fg_fx.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index 5840456c3..9a8fe0a6f 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -139,8 +139,9 @@ FGFX::update (double dt) // still playing, do nothing is_playing = true; } else { - // current message finished, remove - smgr->remove( msgid ); + // current message finished, stop and remove + smgr->stop( msgid ); // removes source + smgr->remove( msgid ); // removes buffer } } if ( !is_playing ) { -- 2.39.5