]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmanager.hxx
Interim windows build fix
[flightgear.git] / src / Sound / soundmanager.hxx
index af7f19bc7da66167dc8024cddc20574617813a02..a22b738845157685ff01746380b21a28c6cceb9e 100644 (file)
 #ifndef __FG_SOUNDMGR_HXX
 #define __FG_SOUNDMGR_HXX 1
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
+#include <memory>
+#include <map>
 #include <simgear/props/props.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/sound/soundmgr_openal.hxx>
 
 class SGSoundMgr;
 class Listener;
+#if defined(ENABLE_FLITE)
+class VoiceSynthesizer;
+#endif
 
 #ifdef ENABLE_AUDIO_SUPPORT
 class FGSoundManager : public SGSoundMgr
 {
 public:
     FGSoundManager();
-    ~FGSoundManager();
+    virtual ~FGSoundManager();
 
     void init(void);
+    virtual void shutdown();
     void update(double dt);
     void reinit(void);
 
     void activate(bool State);
     void update_device_list();
-
+#if defined(ENABLE_FLITE)
+    VoiceSynthesizer * getSynthesizer( const std::string & voice );
+#endif
 private:
     bool stationaryView() const;
   
     bool _is_initialized, _enabled;
     SGPropertyNode_ptr _sound_working, _sound_enabled, _volume, _device_name;
     SGPropertyNode_ptr _currentView;
-    SGPropertyNode_ptr _viewPosLon, _viewPosLat, _viewPosElev;
+    SGPropertyNode_ptr _viewX, _viewY, _viewZ;
     SGPropertyNode_ptr _velocityNorthFPS, _velocityEastFPS, _velocityDownFPS;
     SGPropertyNode_ptr _viewXoffset, _viewYoffset, _viewZoffset;
-    Listener* _listener;
+    std::auto_ptr<Listener> _listener;
+#if defined(ENABLE_FLITE)
+    std::map<std::string,VoiceSynthesizer*> _synthesizers;
+#endif
 };
 #else
 #include "Main/fg_props.hxx"
@@ -67,6 +74,8 @@ public:
     ~FGSoundManager() {}
 
     void update(double dt) {}
+
+    static const char* subsystemName() { return "sound"; }
 };
 
 #endif // ENABLE_AUDIO_SUPPORT