]> git.tdb.fi Git - libs/al.git/blob - source/device.cpp
Drop copyright notices and Id tags from source files
[libs/al.git] / source / device.cpp
1 #include <msp/core/except.h>
2 #include "device.h"
3
4 using namespace std;
5
6 namespace Msp {
7 namespace AL {
8
9 Device::Device()
10 {
11         dev = alcOpenDevice(0);
12         if(!dev)
13                 throw Exception("Couldn't get OpenAL device");
14 }
15
16 Device::Device(const string &spec)
17 {
18         dev = alcOpenDevice(spec.c_str());
19         if(!dev)
20                 throw Exception("Couldn't get OpenAL device");
21 }
22
23 Device::~Device()
24 {
25         alcCloseDevice(dev);
26 }
27
28 } // namespace AL
29 } // namespace Msp