1 // fg_sound.hxx -- Sound class implementation
3 // Started by Erik Hofman, February 2002
5 // Copyright (C) 2002 Erik Hofman - erik@ehofman.com
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define __FGSOUND_HXX 1
30 #include <simgear/compiler.h>
31 #include <Main/fgfs.hxx>
32 #include <Main/globals.hxx>
34 #include "soundmgr.hxx"
37 * Class for handling one sound.
40 class FGSound : public FGSubsystem
46 enum { LIN=0, LOG, LN };
47 enum { ONCE=0, LOOPED };
48 enum { LEVEL=0, INVERTED, FLIPFLOP };
50 FGSound(const SGPropertyNode *);
55 virtual void unbind ();
56 virtual void update (int dt);
60 const SGPropertyNode * _node;
62 FGSimpleSound * _sample;
63 const SGPropertyNode * _property;
73 // Sound source (distance, horizontal position in degrees and
74 // vertical position in degrees)
84 const SGPropertyNode * prop;
93 vector<_snd_prop> _volume;
94 vector<_snd_prop> _pitch;