X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcontext.cpp;fp=source%2Fcontext.cpp;h=aa316fd89e49dcb64b0909c1be74de3d76aafa21;hb=35ea5cc8d1eb8c806885d27441548f630e7b1266;hp=0000000000000000000000000000000000000000;hpb=ddb247cf59f06eb477c3a2420da6d721e58c2914;p=libs%2Fal.git diff --git a/source/context.cpp b/source/context.cpp new file mode 100644 index 0000000..aa316fd --- /dev/null +++ b/source/context.cpp @@ -0,0 +1,25 @@ +/* $Id$ + +This file is part of libmspal +Copyright © 2008 Mikko Rasa, Mikkosoft Productions +Diestributed under the LGPL +*/ + +#include +#include "context.h" +#include "device.h" + +namespace Msp { +namespace AL { + +Context::Context(Device &dev) +{ + context=alcCreateContext(dev.get_device(), 0); + if(!context) + throw Exception("Couldn't create OpenAL context"); + + alcMakeContextCurrent(context); +} + +} // namespace AL +} // namespace Msp