-/* $Id$
-
-This file is part of libmspal
-Copyright © 2008 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#include <msp/core/except.h>
+#include <stdexcept>
#include "context.h"
#include "device.h"
Context::Context(Device &dev)
{
- context=alcCreateContext(dev.get_device(), 0);
+ context = alcCreateContext(dev.get_device(), 0);
if(!context)
- throw Exception("Couldn't create OpenAL context");
+ throw std::runtime_error("Couldn't create OpenAL context");
alcMakeContextCurrent(context);
}
+Context::~Context()
+{
+ alcDestroyContext(context);
+}
+
} // namespace AL
} // namespace Msp