]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/xmlsound.cxx
Patch to avoid the problem of the socket resource not yet being available
[simgear.git] / simgear / sound / xmlsound.cxx
index 616d9514f59d976da1c4e4a7f32437929a8e8b3c..2ca9cdfa8f2f6379726149264e0e4309033a8ad8 100644 (file)
@@ -84,7 +84,7 @@ SGXmlSound::~SGXmlSound()
 void
 SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node,
                  SGSampleGroup *sgrp, SGSampleGroup *avionics,
-                 const string &path)
+                 const SGPath& currentDir)
 {
 
    //
@@ -272,7 +272,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node,
    } else {
       _sgrp = sgrp;
    }
-   _sample = new SGSoundSample( path.c_str(), node->getStringValue("path", ""));
+   _sample = new SGSoundSample(node->getStringValue("path", ""), currentDir);
    if (!_sample->file_path().exists()) {
       throw sg_io_exception("XML sound: couldn't find file: " + _sample->file_path().str());
    }