#include <simgear/structure/SGSharedPtr.hxx>
#include <simgear/math/SGMath.hxx>
+class SGPath;
+
/**
* manages everything we need to know for an individual audio sample
*/
/**
* Constructor
- * @param path Path name to sound
* @param file File name of sound
Buffer data is freed by the sample group
*/
- SGSoundSample( const char *path, const char *file );
+ SGSoundSample(const char *file, const SGPath& currentDir);
/**
* Constructor.
/**
* Destructor
*/
- ~SGSoundSample ();
+ virtual ~SGSoundSample ();
/**
* Detect wheter this audio sample holds the information of a sound file.
*/
inline bool is_file() const { return _is_file; }
+ SGPath file_path() const;
+
/**
* Test if this audio sample configuration has changed since the last call.
* Calling this function will reset the flag so calling it a second
* @param _loop Define whether this sound should be played in a loop.
*/
void play( bool loop = false ) {
- _playing = true; _loop = loop; _changed = true;
+ _playing = true; _loop = loop; _changed = true; _static_changed = true;
}
/**