X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcontext.cpp;h=14f607cdd9778a6cdcb87bef5aaadc43c9ed5057;hb=14008b157c64752ba7c1cef831124992c35c4646;hp=aa316fd89e49dcb64b0909c1be74de3d76aafa21;hpb=35ea5cc8d1eb8c806885d27441548f630e7b1266;p=libs%2Fal.git diff --git a/source/context.cpp b/source/context.cpp index aa316fd..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 -Diestributed 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