]> git.mxchange.org Git - flightgear.git/commitdiff
allow sound effects in the configuration file to be added to the 'avionics' sample...
authorehofman <ehofman>
Mon, 9 Nov 2009 10:28:59 +0000 (10:28 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 10 Nov 2009 05:55:46 +0000 (06:55 +0100)
src/Sound/fg_fx.cxx
src/Sound/fg_fx.hxx

index 4d879bff26d90ef4a441dfb72cfb371d81624aef..abf3a2678668dbb997b896c3010f629b5266e15d 100644 (file)
@@ -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 ) {
index 62e111076ba3fb06671acc30e4ed12f4f42d900d..8a004465ce196bea6d06d9bc48ebc654638363ff 100644 (file)
@@ -57,6 +57,7 @@ public:
 
 private:
 
+    SGSharedPtr<SGSampleGroup> _avionics;
     std::vector<SGXmlSound *> _sound;
 
     bool last_pause;