# include <simgear_config.h>
#endif
+#include "xmlsound.hxx"
+
+
#include <simgear/compiler.h>
#include <string.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/props/props.hxx>
#include <simgear/props/condition.hxx>
-#include <simgear/math/SGMath.hxx>
#include <simgear/structure/exception.hxx>
#include <simgear/misc/sg_path.hxx>
-#include "xmlsound.hxx"
+#include "sample_group.hxx"
+#include "sample_openal.hxx"
+using std::string;
// static double _snd_lin(double v) { return v; }
static double _snd_inv(double v) { return (v == 0) ? 1e99 : 1/v; }
}
void
-SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node,
- SGSampleGroup *sgrp, SGSampleGroup *avionics,
- const SGPath& currentDir)
+SGXmlSound::init( SGPropertyNode *root,
+ SGPropertyNode *node,
+ SGSampleGroup *sgrp,
+ SGSampleGroup *avionics,
+ const SGPath& path )
{
//
_sgrp = sgrp;
}
string soundFileStr = node->getStringValue("path", "");
- _sample = new SGSoundSample(soundFileStr.c_str(), currentDir);
+ _sample = new SGSoundSample(soundFileStr.c_str(), path);
if (!_sample->file_path().exists()) {
throw sg_io_exception("XML sound: couldn't find file: '" + soundFileStr + "'");
}