X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FSound%2Ffg_fx.hxx;h=3803f5bc6ad1538d568a6356b63e3277aa77bc24;hb=58e79013e3c1d412d8e1f8adc0c39a400484c5ae;hp=08d690c884009f7355b2a66a335d50b3b9df4404;hpb=5329ed10a7f555a9ece73f37b5a2a990315fdac7;p=flightgear.git diff --git a/src/Sound/fg_fx.hxx b/src/Sound/fg_fx.hxx index 08d690c88..3803f5bc6 100644 --- a/src/Sound/fg_fx.hxx +++ b/src/Sound/fg_fx.hxx @@ -17,78 +17,58 @@ // // 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$ #ifndef __FGFX_HXX #define __FGFX_HXX 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #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 ( SGSoundMgr *smgr, const 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; };