]> git.mxchange.org Git - flightgear.git/blob - src/Sound/fg_environmentfx.hxx
59e1a97060105a64d2d2cecc277906573ca5b4ea
[flightgear.git] / src / Sound / fg_environmentfx.hxx
1 // fg_environmentfx.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 __FGENVIRONMENTFX_HXX
25 #define __FGENVIRONMENTFX_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
35 class SGXmlSound;
36
37
38 /**
39  * Container for FlightGear envirnonmetal sound effects.
40  */
41 class FGEnvironmentFX : public SGSampleGroup
42 {
43
44 public:
45
46     FGEnvironmentFX();
47     ~FGEnvironmentFX();
48
49     void init ();
50     void reinit();
51     void update (double dt);
52     void unbind();
53
54     void add(std::string& path_str, const std::string& refname);
55     void position(const std::string& refname, const SGVec3d& pos);
56     void pitch(const std::string& refname, float pitch);
57     void volume(const std::string& refname, float volume);
58     void properties(const std::string& refname, float reference_dist, float max_dist = -1 );
59
60 private:
61     SGPropertyNode_ptr _enabled;
62     SGPropertyNode_ptr _volume;
63 };
64
65
66 #endif
67
68 // end of fg_environmentfx.hxx