From 2bc7dc685b35b489730ef36050a318b331c14977 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 9 Nov 2009 10:28:59 +0000 Subject: [PATCH] allow sound effects in the configuration file to be added to the 'avionics' sample group by setting 'avionics'. --- src/Sound/fg_fx.cxx | 3 ++- src/Sound/fg_fx.hxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index 4d879bff2..abf3a2678 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -47,6 +47,7 @@ FGFX::FGFX ( SGSoundMgr *smgr, const string &refname ) : SGSampleGroup::_smgr = smgr; SGSampleGroup::_refname = refname; SGSampleGroup::_smgr->add(this, refname); + _avionics = _smgr->find("avionics", true); } @@ -91,7 +92,7 @@ FGFX::init() try { sound->init(globals->get_props(), node->getChild(i), this, - globals->get_fg_root()); + _avionics, globals->get_fg_root()); _sound.push_back(sound); } catch ( sg_exception &e ) { diff --git a/src/Sound/fg_fx.hxx b/src/Sound/fg_fx.hxx index 62e111076..8a004465c 100644 --- a/src/Sound/fg_fx.hxx +++ b/src/Sound/fg_fx.hxx @@ -57,6 +57,7 @@ public: private: + SGSharedPtr _avionics; std::vector _sound; bool last_pause;