#include <simgear/structure/exception.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/math/SGMath.hxx>
+#include <simgear/misc/ResourceManager.hxx>
#include "soundmgr_openal.hxx"
#include "sample_openal.hxx"
}
// constructor
-SGSoundSample::SGSoundSample( const char *path, const char *file ) :
+SGSoundSample::SGSoundSample(const char *file, const SGPath& currentDir) :
_absolute_pos(SGVec3d::zeros()),
_relative_pos(SGVec3d::zeros()),
_direction(SGVec3d::zeros()),
_static_changed(true),
_is_file(true)
{
- SGPath samplepath( path );
- if ( strlen(file) ) {
- samplepath.append( file );
- }
- _refname = samplepath.str();
+ SGPath p = simgear::ResourceManager::instance()->findPath(file, currentDir);
+ _refname = p.str();
}
// constructor