]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/sample_openal.cxx
scenery: Really, most people don't care for the noise.
[simgear.git] / simgear / sound / sample_openal.cxx
index 022cb40dc99bdaf4d0da06079d4d3f1e8e8d3a59..13e27145f418bcac3fc0ee2dc4c7895da7be441e 100644 (file)
@@ -74,12 +74,13 @@ SGSoundSample::SGSoundSample() :
     _playing(false),
     _changed(true),
     _static_changed(true),
+    _out_of_range(false),
     _is_file(false)
 {
 }
 
 // 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()),
@@ -109,9 +110,10 @@ SGSoundSample::SGSoundSample( const char *path, const char *file ) :
     _playing(false),
     _changed(true),
     _static_changed(true),
+    _out_of_range(false),
     _is_file(true)
 {
-    SGPath p = simgear::ResourceManager::instance()->findPath(file);
+    SGPath p = simgear::ResourceManager::instance()->findPath(file, currentDir);
     _refname = p.str();
 }
 
@@ -146,9 +148,10 @@ SGSoundSample::SGSoundSample( const unsigned char** data,
     _playing(false),
     _changed(true),
     _static_changed(true),
+    _out_of_range(false),
     _is_file(false)
 {
-    SG_LOG( SG_GENERAL, SG_DEBUG, "In memory sounds sample" );
+    SG_LOG( SG_SOUND, SG_DEBUG, "In memory sounds sample" );
     _data = (unsigned char*)*data; *data = NULL;
 }
 
@@ -182,9 +185,10 @@ SGSoundSample::SGSoundSample( void** data, int len, int freq, int format ) :
     _playing(false),
     _changed(true),
     _static_changed(true),
+    _out_of_range(false),
     _is_file(false)
 {
-    SG_LOG( SG_GENERAL, SG_DEBUG, "In memory sounds sample" );
+    SG_LOG( SG_SOUND, SG_DEBUG, "In memory sounds sample" );
     _data = (unsigned char*)*data; *data = NULL;
 }