X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsound%2Fsample_group.hxx;h=ccf1e85db1f4ede870f4d48ef6b553f63cd9b9c9;hb=bcb320b537b6f7e5e3724e8a30d309322171eb43;hp=f4ae23d2d948e7b98277373581b1b893826a991c;hpb=8d551c266430b283da04e1a9e4fdf70e8f63362f;p=simgear.git diff --git a/simgear/sound/sample_group.hxx b/simgear/sound/sample_group.hxx index f4ae23d2..ccf1e85d 100644 --- a/simgear/sound/sample_group.hxx +++ b/simgear/sound/sample_group.hxx @@ -52,6 +52,7 @@ #include #include "sample_openal.hxx" +#include "sample_queue.hxx" using std::map; using std::string; @@ -84,7 +85,7 @@ public: /** * Destructor */ - ~SGSampleGroup (); + virtual ~SGSampleGroup (); /** * Set the status of this sample group to active. @@ -128,6 +129,11 @@ public: */ 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. */ @@ -189,7 +195,9 @@ public: * 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. @@ -197,8 +205,7 @@ public: * @param pos Base position */ void set_position_geod( const SGGeod& pos ) { - _position_geod = pos; - _base_pos = SGVec3d::fromGeod( pos ); _changed = true; + _base_pos = pos; _changed = true; } /** @@ -225,9 +232,8 @@ private: float _volume; bool _tied_to_listener; - SGVec3f _velocity; - SGVec3d _base_pos; - SGGeod _position_geod; + SGVec3d _velocity; + SGGeod _base_pos; SGQuatd _orientation; sample_map _samples;