]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/xmlsound.cxx
Fix #1783: repeated error message on console
[simgear.git] / simgear / sound / xmlsound.cxx
index 2b914d596258c00f9f13ab48d013ada878f840b4..7891bf78812c19f7cbd7e54ddfc90941ee1abc89 100644 (file)
@@ -25,6 +25,9 @@
 #  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; }
@@ -84,9 +88,11 @@ SGXmlSound::~SGXmlSound()
 }
 
 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 )
 {
 
    //
@@ -275,7 +281,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node,
       _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 + "'");
    }