]> git.mxchange.org Git - flightgear.git/commitdiff
Small change to avoid dangling audio resources.
authorcurt <curt>
Tue, 10 Jan 2006 14:51:12 +0000 (14:51 +0000)
committercurt <curt>
Tue, 10 Jan 2006 14:51:12 +0000 (14:51 +0000)
src/Sound/fg_fx.cxx

index 5840456c376ab28ae4141da2f57b2d776acc7136..9a8fe0a6fc9c78da2e6be1fc887fb5ec40c60ce1 100644 (file)
@@ -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 ) {