]> 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 2629c29d1f92cd0e7110cde9d6fb6fe96b783b0c..7891bf78812c19f7cbd7e54ddfc90941ee1abc89 100644 (file)
@@ -88,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 )
 {
 
    //
@@ -279,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 + "'");
    }