From 69f9e7f80e7c9e79f9da3672338aa08c447ebef2 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 27 Jun 2005 00:02:20 +0000 Subject: [PATCH] fix openal stalling at exit SVN-Revision: 2647 --- src/audio/sound_manager.cpp | 3 ++- src/audio/sound_manager.hpp | 2 ++ src/resources.cpp | 1 - src/resources.hpp | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/audio/sound_manager.cpp b/src/audio/sound_manager.cpp index 933ddcffb..013889d44 100644 --- a/src/audio/sound_manager.cpp +++ b/src/audio/sound_manager.cpp @@ -9,6 +9,8 @@ #include "sound_source.hpp" #include "stream_sound_source.hpp" +SoundManager* sound_manager; + SoundManager::SoundManager() : device(0), context(0), sound_enabled(false), music_source(0), next_music_source(0) @@ -51,7 +53,6 @@ SoundManager::~SoundManager() } if(context != 0) { - alcMakeContextCurrent(0); alcDestroyContext(context); } if(device != 0) { diff --git a/src/audio/sound_manager.hpp b/src/audio/sound_manager.hpp index 3b3959e26..023416119 100644 --- a/src/audio/sound_manager.hpp +++ b/src/audio/sound_manager.hpp @@ -70,5 +70,7 @@ private: std::string current_music; }; +extern SoundManager* sound_manager; + #endif diff --git a/src/resources.cpp b/src/resources.cpp index ba1eedcc4..39cb26f20 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -29,7 +29,6 @@ SpriteManager* sprite_manager = 0; TileManager* tile_manager = 0; -SoundManager* sound_manager = 0; MouseCursor* mouse_cursor = 0; diff --git a/src/resources.hpp b/src/resources.hpp index cf90875e3..30a6eb518 100644 --- a/src/resources.hpp +++ b/src/resources.hpp @@ -34,7 +34,6 @@ extern Surface* tux_life; extern SpriteManager* sprite_manager; extern TileManager* tile_manager; -extern SoundManager* sound_manager; extern Menu* contrib_menu; extern Menu* contrib_subset_menu; -- 2.11.0