]> git.tdb.fi Git - libs/al.git/blob - source/context.cpp
Drop copyright notices and Id tags from source files
[libs/al.git] / source / context.cpp
1 #include <msp/core/except.h>
2 #include "context.h"
3 #include "device.h"
4
5 namespace Msp {
6 namespace AL {
7
8 Context::Context(Device &dev)
9 {
10         context = alcCreateContext(dev.get_device(), 0);
11         if(!context)
12                 throw Exception("Couldn't create OpenAL context");
13
14         alcMakeContextCurrent(context);
15 }
16
17 Context::~Context()
18 {
19         alcDestroyContext(context);
20 }
21
22 } // namespace AL
23 } // namespace Msp