#include <simgear/structure/exception.hxx>
#include "sample_openal.hxx"
+#include "sample_queue.hxx"
using std::map;
using std::string;
/**
* Destructor
*/
- ~SGSampleGroup ();
+ virtual ~SGSampleGroup ();
/**
* Set the status of this sample group to active.
*/
SGSoundSample *find( const string& refname );
+ /**
+ * Stop all playing samples and set the source id to invalid.
+ */
+ void stop();
+
/**
* Request to stop playing all audio samples until further notice.
*/
* This is in the local frame coordinate system; x=north, y=east, z=down
* @param vel Velocity vector
*/
- void set_velocity( const SGVec3f& vel );
+ void set_velocity( const SGVec3d& vel ) {
+ _velocity = vel; _changed = true;
+ }
/**
* Set the position of this sample group.
* @param pos Base position
*/
void set_position_geod( const SGGeod& pos ) {
- _base_pos = SGVec3d::fromGeod( pos ); _changed = true;
+ _base_pos = pos; _changed = true;
}
/**
float _volume;
bool _tied_to_listener;
- SGVec3f _velocity;
- SGVec3d _base_pos;
+ SGVec3d _velocity;
+ SGGeod _base_pos;
SGQuatd _orientation;
sample_map _samples;