X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fglobals.cxx;h=da3de6a46beeba1fabe72597bd86356dde77e94a;hb=0d45920098c7f8de25968ee08c5a69e7237aea0d;hp=2d00791a2a7ba7f9f469148808ed35f5b7a12782;hpb=e98d7a1ea47aaa36a9cdd1fb4001f8e39842dcac;p=flightgear.git diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index 2d00791a2..da3de6a46 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -15,8 +15,8 @@ // General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -24,7 +24,6 @@ # include #endif -#include #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include #include #include @@ -73,6 +73,7 @@ FGGlobals::FGGlobals() : renderer( new FGRenderer ), subsystem_mgr( new SGSubsystemMgr ), event_mgr( new SGEventMgr ), + soundmgr( new SGSoundMgr ), sim_time_sec( 0.0 ), fg_root( "" ), warp( 0 ), @@ -83,7 +84,6 @@ FGGlobals::FGGlobals() : matlib( NULL ), route_mgr( NULL ), current_panel( NULL ), - soundmgr( NULL ), ATC_mgr( NULL ), AI_mgr( NULL ), controls( NULL ), @@ -95,7 +95,6 @@ FGGlobals::FGGlobals() : initial_waypoints( NULL ), scenery( NULL ), tile_mgr( NULL ), - io( new FGIO ), fontcache ( new FGFontCache ), navlist( NULL ), loclist( NULL ), @@ -128,6 +127,7 @@ FGGlobals::~FGGlobals() // deleted subsystems. subsystem_mgr->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("input"); subsystem_mgr->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("gui"); + subsystem_mgr->unbind(); delete subsystem_mgr; delete event_mgr; delete time_params; @@ -136,7 +136,6 @@ FGGlobals::~FGGlobals() delete matlib; delete route_mgr; delete current_panel; - delete soundmgr; delete ATC_mgr; delete AI_mgr; @@ -150,7 +149,6 @@ FGGlobals::~FGGlobals() delete initial_waypoints; delete tile_mgr; delete scenery; - delete io; delete fontcache; delete navlist; @@ -162,6 +160,9 @@ FGGlobals::~FGGlobals() delete channellist; delete airwaynet; delete multiplayer_mgr; + + soundmgr->unbind(); + delete soundmgr; } @@ -263,6 +264,11 @@ FGGlobals::add_subsystem (const char * name, subsystem_mgr->add(name, subsystem, type, min_time_sec); } +SGSoundMgr * +FGGlobals::get_soundmgr () const +{ + return soundmgr; +} SGEventMgr * FGGlobals::get_event_mgr () const