//
// $Id$
+#ifdef _MSC_VER
+#pragma warning (disable: 4786)
+#endif
+
#include <simgear/misc/props.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/debug/logstream.hxx>
void
FGFX::init()
{
- const SGPropertyNode * node = fgGetNode("/sim/sound", true);
+ SGPropertyNode * node = fgGetNode("/sim/sound", true);
int i;
string path_str = node->getStringValue("path");
SGPath path( globals->get_fg_root() );
- if (path_str == "") {
+ if (path_str.empty()) {
SG_LOG(SG_GENERAL, SG_ALERT, "Incorrect path in configuration file.");
return;
}
node = root.getNode("fx");
for (i = 0; i < node->nChildren(); i++) {
- FGSound * sound;
- sound = new FGSound(node->getChild(i));
- _sound.push_back(sound);
- }
+ FGSound *sound = new FGSound();
+ sound->init(node->getChild(i));
- for (i = 0; i < (int)_sound.size(); i++ ) {
- _sound[i]->init();
+ _sound.push_back(sound);
}
}
}
void
-FGFX::update (int dt)
+FGFX::update (double dt)
{
for (unsigned int i = 0; i < _sound.size(); i++ )
_sound[i]->update(dt);