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();
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)
{
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 );
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 ) {