X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcontext.cpp;h=14f607cdd9778a6cdcb87bef5aaadc43c9ed5057;hb=14008b157c64752ba7c1cef831124992c35c4646;hp=1ca0eac92d3d6a6b6f88fcbb7dac054395152a92;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/context.cpp b/source/context.cpp index 1ca0eac..14f607c 100644 --- a/source/context.cpp +++ b/source/context.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include "context.h" #include "device.h" @@ -14,12 +7,17 @@ namespace AL { 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"); alcMakeContextCurrent(context); } +Context::~Context() +{ + alcDestroyContext(context); +} + } // namespace AL } // namespace Msp