1 // fg_fx.hxx -- Sound effect management class
3 // Started by David Megginson, October 2001
4 // (Reuses some code from main.cxx, probably by Curtis Olson)
6 // Copyright (C) 2001 Curtis L. Olson - http://www.flightgear.org/~curt
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #include <simgear/compiler.h>
31 #include <simgear/structure/subsystem_mgr.hxx>
32 #include <simgear/sound/sample_group.hxx>
37 * Generator for FlightGear sound effects.
39 * This module uses a FGSampleGroup class to generate sound effects based
40 * on current flight conditions. The sound manager must be initialized
41 * before this object is.
43 * This module will load and play a set of sound effects defined in an
44 * xml file and tie them to various property states.
46 class FGFX : public SGSampleGroup
51 FGFX ( SGSoundMgr *smgr, const string &refname );
55 virtual void reinit ();
56 virtual void update (double dt);
60 SGSharedPtr<SGSampleGroup> _avionics;
61 std::vector<SGXmlSound *> _sound;
63 SGPropertyNode_ptr _enabled;
64 SGPropertyNode_ptr _volume;
65 SGPropertyNode_ptr _avionics_enabled;
66 SGPropertyNode_ptr _avionics_volume;
67 SGPropertyNode_ptr _avionics_external;
68 SGPropertyNode_ptr _internal;