1 // fg_environmentfx.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.
24 #ifndef __FGENVIRONMENTFX_HXX
25 #define __FGENVIRONMENTFX_HXX 1
27 #include <simgear/compiler.h>
29 #include <simgear/structure/subsystem_mgr.hxx>
30 #include <simgear/props/props.hxx>
31 #include <simgear/sound/sample_group.hxx>
32 #include <simgear/math/SGMathFwd.hxx>
37 * Container for FlightGear envirnonmetal sound effects.
39 class FGEnvironmentFX : public SGSampleGroup
45 virtual ~FGEnvironmentFX();
49 void update (double dt);
52 bool add(const std::string& path_str, const std::string& refname);
53 void position(const std::string& refname, double lon, double lat, double elevation = 0.0);
54 void pitch(const std::string& refname, float pitch);
55 void volume(const std::string& refname, float volume);
56 void properties(const std::string& refname, float reference_dist, float max_dist = -1 );
57 void play(const std::string& refname, bool looping = false);
58 void stop(const std::string& refname);
61 SGPropertyNode_ptr _enabled;
62 SGPropertyNode_ptr _volume;
68 // end of fg_environmentfx.hxx