From cde95864b459c833e024d2107b40a36384c3adeb Mon Sep 17 00:00:00 2001 From: Dan Wickstrom Date: Tue, 14 May 2019 12:51:35 -0400 Subject: [PATCH] Aircraft model reinit deletes sound effect samples, but leaves them defined in the sample group, so a reload doesn't re-add them. --- simgear/sound/xmlsound.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 7bb25c89..148c6b39 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -83,6 +83,9 @@ SGXmlSound::~SGXmlSound() if (_sample) _sample->stop(); + if (_sgrp && (_name != "")) + _sgrp->remove(_name); + _volume.clear(); _pitch.clear(); }