X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdevice.cpp;fp=source%2Fdevice.cpp;h=422b7ea2f8e055970c6ba9d6d9297c60a0f95e58;hb=35ea5cc8d1eb8c806885d27441548f630e7b1266;hp=0000000000000000000000000000000000000000;hpb=ddb247cf59f06eb477c3a2420da6d721e58c2914;p=libs%2Fal.git diff --git a/source/device.cpp b/source/device.cpp new file mode 100644 index 0000000..422b7ea --- /dev/null +++ b/source/device.cpp @@ -0,0 +1,31 @@ +/* $Id$ + +This file is part of libmspal +Copyright © 2008 Mikko Rasa, Mikkosoft Productions +Diestributed under the LGPL +*/ + +#include +#include "device.h" + +using namespace std; + +namespace Msp { +namespace AL { + +Device::Device() +{ + dev=alcOpenDevice(0); + if(!dev) + throw Exception("Couldn't get OpenAL device"); +} + +Device::Device(const string &spec) +{ + dev=alcOpenDevice(spec.c_str()); + if(!dev) + throw Exception("Couldn't get OpenAL device"); +} + +} // namespace AL +} // namespace Msp