1
0
Fork 0

allow sound effects in the configuration file to be added to the 'avionics' sample group by setting '<type>avionics</type>'.

This commit is contained in:
ehofman 2009-11-09 10:28:59 +00:00 committed by Tim Moore
parent 8117134879
commit 2bc7dc685b
2 changed files with 3 additions and 1 deletions

View file

@ -47,6 +47,7 @@ FGFX::FGFX ( SGSoundMgr *smgr, const string &refname ) :
SGSampleGroup::_smgr = smgr; SGSampleGroup::_smgr = smgr;
SGSampleGroup::_refname = refname; SGSampleGroup::_refname = refname;
SGSampleGroup::_smgr->add(this, refname); SGSampleGroup::_smgr->add(this, refname);
_avionics = _smgr->find("avionics", true);
} }
@ -91,7 +92,7 @@ FGFX::init()
try { try {
sound->init(globals->get_props(), node->getChild(i), this, sound->init(globals->get_props(), node->getChild(i), this,
globals->get_fg_root()); _avionics, globals->get_fg_root());
_sound.push_back(sound); _sound.push_back(sound);
} catch ( sg_exception &e ) { } catch ( sg_exception &e ) {

View file

@ -57,6 +57,7 @@ public:
private: private:
SGSharedPtr<SGSampleGroup> _avionics;
std::vector<SGXmlSound *> _sound; std::vector<SGXmlSound *> _sound;
bool last_pause; bool last_pause;