From: curt Date: Tue, 10 Jan 2006 14:51:12 +0000 (+0000) Subject: Small change to avoid dangling audio resources. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=311b85a11d01f4cd94fdb563ad111403fd0009f2;p=flightgear.git Small change to avoid dangling audio resources. --- 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 ) {