X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSound%2Ffg_fx.hxx;h=7d5132dd9e2a9c85a80fc4ba97f423b03ddab104;hb=bcea720db3e29a62626b361f2149a7147e149f3b;hp=61aee36ec7d4e3fd6c4ea85c6efff65289ea2691;hpb=4132b41470b703d93736c5c1d04ed6865e64fdc3;p=flightgear.git diff --git a/src/Sound/fg_fx.hxx b/src/Sound/fg_fx.hxx index 61aee36ec..7d5132dd9 100644 --- a/src/Sound/fg_fx.hxx +++ b/src/Sound/fg_fx.hxx @@ -17,7 +17,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -26,65 +26,49 @@ #include -#include #include -#include #include - -SG_USING_STD(queue); -SG_USING_STD(vector); +#include +#include class SGXmlSound; /** * Generator for FlightGear sound effects. * - * This module uses FGSoundMgr to generate sound effects based - * on current flight conditions. The sound manager must be initialized + * This module uses a FGSampleGroup class to generate sound effects based + * on current flight conditions. The sound manager must be initialized * before this object is. * - * Note: this module supports two separate sound mechanisms concurrently. - * - * 1. This module will load and play a set of sound effects defined in an + * This module will load and play a set of sound effects defined in an * xml file and tie them to various property states. - * 2. This modules also maintains a queue of 'message' audio files. These - * are played sequentially with no overlap until the queue is finished. - * This second mechanims is useful for things like tutorial messages or - * background atc chatter. */ -class FGFX : public SGSubsystem +class FGFX : public SGSampleGroup { public: - FGFX (); + FGFX ( const std::string &refname, SGPropertyNode *props = 0 ); virtual ~FGFX (); virtual void init (); virtual void reinit (); - virtual void bind (); - virtual void unbind (); virtual void update (double dt); - /** - * add a sound sample to the message queue which is played sequentially - * in order. - */ - void play_message( SGSoundSample *_sample ); - void play_message( const string path, const string fname ); - private: - vector _sound; - queue _samplequeue; - - bool last_pause; - double last_volume; - - SGPropertyNode *_pause; - SGPropertyNode *_volume; - + bool _is_aimodel; + SGSharedPtr _avionics; + std::vector _sound; + + SGPropertyNode_ptr _props; + SGPropertyNode_ptr _enabled; + SGPropertyNode_ptr _volume; + SGPropertyNode_ptr _avionics_enabled; + SGPropertyNode_ptr _avionics_volume; + SGPropertyNode_ptr _avionics_ext; + SGPropertyNode_ptr _internal; };