diff --git a/src/Environment/fgclouds.cxx b/src/Environment/fgclouds.cxx index 208fa402b..57d7ba42e 100644 --- a/src/Environment/fgclouds.cxx +++ b/src/Environment/fgclouds.cxx @@ -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(); diff --git a/src/Instrumentation/mk_viii.cxx b/src/Instrumentation/mk_viii.cxx index 12f3ef050..22cdb723b 100755 --- a/src/Instrumentation/mk_viii.cxx +++ b/src/Instrumentation/mk_viii.cxx @@ -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) { diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index ddeab463b..354a92bc0 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -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 ); diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index 950e0bdd0..ab0ace0a9 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -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 ) {