]> git.mxchange.org Git - flightgear.git/blob - src/Sound/fg_fx.hxx
Correct (and verrified) position, orientation and velocity vector. Todo: proper sound...
[flightgear.git] / src / Sound / fg_fx.hxx
1 // fg_fx.hxx -- Sound effect management class
2 //
3 // Started by David Megginson, October 2001
4 // (Reuses some code from main.cxx, probably by Curtis Olson)
5 //
6 // Copyright (C) 2001  Curtis L. Olson - http://www.flightgear.org/~curt
7 //
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.
12 //
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.
17 //
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.
21 //
22 // $Id$
23
24 #ifndef __FGFX_HXX
25 #define __FGFX_HXX 1
26
27 #include <simgear/compiler.h>
28
29 #include <vector>
30
31 #include <simgear/structure/subsystem_mgr.hxx>
32 #include <simgear/sound/sample_group.hxx>
33
34 class SGXmlSound;
35
36 /**
37  * Generator for FlightGear sound effects.
38  *
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.
42  *
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.
45  */
46 class FGFX : public SGSampleGroup
47 {
48
49 public:
50
51     FGFX ( SGSoundMgr *smgr, const string &refname );
52     virtual ~FGFX ();
53
54     virtual void init ();
55     virtual void reinit ();
56     virtual void update (double dt);
57
58 private:
59
60     std::vector<SGXmlSound *> _sound;
61
62     bool last_pause;
63     double last_volume;
64
65     SGPropertyNode_ptr _pause;
66     SGPropertyNode_ptr _volume;
67 };
68
69
70 #endif
71
72 // end of fg_fx.hxx