~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/Sound/fg_fx.cxx

  • Committer: Package Import Robot
  • Author(s): Ove Kaaven
  • Date: 2011-09-03 22:16:12 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20110903221612-2cjy0z7ztj5nkln5
Tags: 2.4.0-1
* New upstream release. Closes: #638588.
* Build-Depend on OpenSceneGraph 3.0, and the Subversion library.
* Recommend fgfs-scenery-base.
* Enable parallel builds (shorter compile times on multicore CPUs).
* Removed hack that tried to build without optimizations if
  building with optimizations fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    SGPropertyNode *node = fgGetNode("/sim/sound", true);
70
70
 
71
71
    string path_str = node->getStringValue("path");
72
 
    SGPath path( globals->get_fg_root() );
73
72
    if (path_str.empty()) {
74
73
        SG_LOG(SG_GENERAL, SG_ALERT, "No path in /sim/sound/path");
75
74
        return;
76
75
    }
77
 
 
78
 
    path.append(path_str.c_str());
 
76
    
 
77
    SGPath path = globals->resolve_aircraft_path(path_str);
79
78
    SG_LOG(SG_GENERAL, SG_INFO, "Reading sound " << node->getName()
80
79
           << " from " << path.str());
81
80
 
95
94
  
96
95
            try {
97
96
                sound->init(globals->get_props(), node->getChild(i), this,
98
 
                            _avionics, globals->get_fg_root());
 
97
                            _avionics, path.dir());
99
98
  
100
99
                _sound.push_back(sound);
101
100
            } catch ( sg_exception &e ) {
110
109
void
111
110
FGFX::reinit()
112
111
{
 
112
    for ( unsigned int i = 0; i < _sound.size(); i++ ) {
 
113
        delete _sound[i];
 
114
    }
113
115
    _sound.clear();
114
116
    init();
115
117
};