From 2a00ebf9b47f675d237acae9595e32e109bdfbf0 Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Mon, 29 Oct 2001 04:39:05 +0000
Subject: [PATCH] Added sound effect changes from David Megginson.

---
 src/Main/fg_init.cxx | 19 +++++++++++++++++++
 src/Main/globals.hxx | 11 +++++++----
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx
index 1be234127..8ef3e2c58 100644
--- a/src/Main/fg_init.cxx
+++ b/src/Main/fg_init.cxx
@@ -90,6 +90,8 @@
 #include <Navaids/navlist.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
+#include <Sound/fg_fx.hxx>
+#include <Sound/soundmgr.hxx>
 #include <Time/event.hxx>
 #include <Time/light.hxx>
 #include <Time/sunpos.hxx>
@@ -730,6 +732,23 @@ bool fgInitSubsystems( void ) {
     fgInitCommands();
 
 
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the sound subsystem.
+    ////////////////////////////////////////////////////////////////////
+
+    globals->set_soundmgr(new FGSoundMgr);
+    globals->get_soundmgr()->init();
+    globals->get_soundmgr()->bind();
+
+
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the sound-effects subsystem.
+    ////////////////////////////////////////////////////////////////////
+    globals->set_fx(new FGFX);
+    globals->get_fx()->init();
+    globals->get_fx()->bind();
+
+
     ////////////////////////////////////////////////////////////////////
     // Initialize the radio stack subsystem.
     ////////////////////////////////////////////////////////////////////
diff --git a/src/Main/globals.hxx b/src/Main/globals.hxx
index c68053602..170fe8235 100644
--- a/src/Main/globals.hxx
+++ b/src/Main/globals.hxx
@@ -37,10 +37,6 @@
 #include <simgear/misc/commands.hxx>
 #include <simgear/misc/props.hxx>
 
-// #include <Controls/controls.hxx>
-// #include <Sound/soundmgr.hxx>
-// #include "viewmgr.hxx"
-
 SG_USING_STD( vector );
 SG_USING_STD( string );
 
@@ -50,6 +46,7 @@ typedef vector<string> string_list;
 // Forward declarations
 class FGControls;
 class FGSoundMgr;
+class FGFX;
 class FGViewMgr;
 class FGViewer;
 
@@ -89,6 +86,9 @@ private:
     // sound manager
     FGSoundMgr *soundmgr;
 
+    // sound-effects manager
+    FGFX *fx;
+
     // control input state
     FGControls *controls;
 
@@ -144,6 +144,9 @@ public:
     inline FGSoundMgr *get_soundmgr() const { return soundmgr; }
     inline void set_soundmgr( FGSoundMgr *sm ) { soundmgr = sm; }
 
+    inline FGFX *get_fx() const { return fx; }
+    inline void set_fx( FGFX *x ) { fx = x; }
+
     inline FGControls *get_controls() const { return controls; }
     inline void set_controls( FGControls *c ) { controls = c; }