]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.cxx
sigh, forgot another alut* at the wrong place.
[simgear.git] / simgear / sound / soundmgr_openal.cxx
index 22c486daa3e1aec0c38b4594bcecc205d69dbc48..b8c119281a057e71e0a44fd817b1bf943cafe002 100644 (file)
@@ -179,6 +179,8 @@ void SGSoundMgr::stop() {
             _buffers.erase( buffers_current );
         }
 
+        _context = alcGetCurrentContext();
+        _device = alcGetContextsDevice(_context);
         alcDestroyContext(_context);
         alcCloseDevice(_device);
     }
@@ -498,7 +500,7 @@ bool SGSoundMgr::load(string &samplepath, void **dbuf, int *fmt,
     ALenum error =  alGetError();
     if ( error != AL_NO_ERROR ) {
         string msg = "Failed to load wav file: ";
-        msg.append(alutGetErrorString(error));
+        msg.append(alGetErrorString(error));
         throw sg_io_exception(msg.c_str(), sg_location(samplepath));
         return false;
     }