FlightGear next
fg_fx.hxx
Go to the documentation of this file.
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/props/props.hxx>
33#include <simgear/sound/sample_group.hxx>
34
35class SGXmlSound;
36
47class FGFX : public SGSampleGroup
48{
49
50public:
51
52 FGFX ( const std::string &refname, SGPropertyNode *props = 0 );
53 virtual ~FGFX ();
54
55 void init ();
56 void reinit ();
57 void update (double dt) override;
58 void unbind();
59
60private:
61
62 bool _active;
63 bool _is_aimodel;
64 SGSharedPtr<SGSampleGroup> _avionics;
65 SGSharedPtr<SGSampleGroup> _atc;
66
67 std::vector<SGXmlSound *> _sound;
68
69 SGPropertyNode_ptr _props;
70 SGPropertyNode_ptr _enabled;
71 SGPropertyNode_ptr _volume;
72 SGPropertyNode_ptr _avionics_enabled;
73 SGPropertyNode_ptr _avionics_volume;
74 SGPropertyNode_ptr _avionics_ext;
75 SGPropertyNode_ptr _internal;
76 SGPropertyNode_ptr _atc_enabled;
77 SGPropertyNode_ptr _atc_volume;
78 SGPropertyNode_ptr _atc_ext;
79 SGPropertyNode_ptr _machwave_active;
80 SGPropertyNode_ptr _machwave_volume;
81};
82
83
84#endif
85
86// end of fg_fx.hxx
FGFX(const std::string &refname, SGPropertyNode *props=0)
Definition fg_fx.cxx:46
void reinit()
Definition fg_fx.cxx:169
void init()
Definition fg_fx.cxx:111
virtual ~FGFX()
Definition fg_fx.cxx:106
void unbind()
Definition fg_fx.cxx:93
void update(double dt) override
Definition fg_fx.cxx:180