]> git.mxchange.org Git - flightgear.git/commitdiff
Pass current-dir into XMLSound
authorJames Turner <zakalawe@mac.com>
Mon, 6 Sep 2010 08:28:28 +0000 (09:28 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 6 Sep 2010 08:28:28 +0000 (09:28 +0100)
(and update to revised SGSoundSample ctor)

src/Environment/fgclouds.cxx
src/Instrumentation/mk_viii.cxx
src/Main/fg_commands.cxx
src/Sound/fg_fx.cxx

index 208fa402b587bea74808edcb195cb1ad78c09a30..57d7ba42ef001a3a46c9c164af9063d5aac327f1 100644 (file)
@@ -66,7 +66,7 @@ void FGClouds::set_update_event(int count) {
 
 void FGClouds::init(void) {
        if( snd_lightning == NULL ) {
-               snd_lightning = new SGSoundSample(globals->get_fg_root().c_str(), "Sounds/thunder.wav");
+               snd_lightning = new SGSoundSample("Sounds/thunder.wav", SGPath());
                snd_lightning->set_max_dist(7000.0f);
                snd_lightning->set_reference_dist(3000.0f);
                SGSoundMgr *smgr = globals->get_soundmgr();
index 12f3ef050c67f35b1d8caea8238fa1ea764dfb11..22cdb723bf3cf8fb39bc8faca94b693c6959ddab 100755 (executable)
@@ -2272,13 +2272,10 @@ MK_VIII::VoicePlayer::get_sample (const char *name)
   SGSoundSample *sample = _sgr->find(refname.str());
   if (! sample)
     {
-      SGPath sample_path(globals->get_fg_root());
-      sample_path.append("Sounds/mk-viii");
-
-      string filename = string(name) + ".wav";
+      string filename = "Sounds/mk-viii" + string(name) + ".wav";
       try
        {
-         sample = new SGSoundSample(sample_path.c_str(), filename.c_str());
+         sample = new SGSoundSample(filename.c_str(), SGPath());
        }
       catch (const sg_exception &e)
        {
index ddeab463bcaabea3626c116c5469686b34a5f70d..354a92bc0fe25aa1cd21ab59e76b07bfb1da433b 100644 (file)
@@ -1211,7 +1211,7 @@ do_play_audio_sample (const SGPropertyNode * arg)
            queue->tie_to_listener();
         }
 
-        SGSoundSample *msg = new SGSoundSample(path.c_str(), file.c_str());
+        SGSoundSample *msg = new SGSoundSample(file.c_str(), path);
         msg->set_volume( volume );
         queue->add( msg );
 
index 950e0bdd071467a6bd9e4e954788e96429ec0913..ab0ace0a94d059f693996f9e43599904babd21aa 100644 (file)
@@ -94,7 +94,7 @@ FGFX::init()
   
             try {
                 sound->init(globals->get_props(), node->getChild(i), this,
-                            _avionics, globals->get_fg_root());
+                            _avionics, path.dir());
   
                 _sound.push_back(sound);
             } catch ( sg_exception &e ) {