fix openal stalling at exit
authorMatthias Braun <matze@braunis.de>
Mon, 27 Jun 2005 00:02:20 +0000 (00:02 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 27 Jun 2005 00:02:20 +0000 (00:02 +0000)
SVN-Revision: 2647

src/audio/sound_manager.cpp
src/audio/sound_manager.hpp
src/resources.cpp
src/resources.hpp

index 933ddcf..013889d 100644 (file)
@@ -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) {
index 3b3959e..0234161 100644 (file)
@@ -70,5 +70,7 @@ private:
   std::string current_music;
 };
 
+extern SoundManager* sound_manager;
+
 #endif
 
index ba1eedc..39cb26f 100644 (file)
@@ -29,7 +29,6 @@
 
 SpriteManager* sprite_manager = 0;
 TileManager* tile_manager = 0;
-SoundManager* sound_manager = 0;
 
 MouseCursor* mouse_cursor = 0;
 
index cf90875..30a6eb5 100644 (file)
@@ -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;