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/props/props.hxx>
33 #include <simgear/sound/sample_group.hxx>
38 * Generator for FlightGear sound effects.
40 * This module uses a FGSampleGroup class to generate sound effects based
41 * on current flight conditions. The sound manager must be initialized
42 * before this object is.
44 * This module will load and play a set of sound effects defined in an
45 * xml file and tie them to various property states.
47 class FGFX : public SGSampleGroup
52 FGFX ( SGSoundMgr *smgr, const string &refname );
56 virtual void reinit ();
57 virtual void update (double dt);
61 SGSharedPtr<SGSampleGroup> _avionics;
62 std::vector<SGXmlSound *> _sound;
64 SGPropertyNode_ptr _enabled;
65 SGPropertyNode_ptr _volume;
66 SGPropertyNode_ptr _avionics_enabled;
67 SGPropertyNode_ptr _avionics_volume;
68 SGPropertyNode_ptr _avionics_external;
69 SGPropertyNode_ptr _internal;