X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdevice.cpp;h=63e87a98dbe509febd59ba665f60be05ae7c9e56;hb=14008b157c64752ba7c1cef831124992c35c4646;hp=1500100cf66a8ef0945e262df4e3dcecb4a70dc8;hpb=8e69eba7dc53233c169152bdf654f032fcd0629f;p=libs%2Fal.git diff --git a/source/device.cpp b/source/device.cpp index 1500100..63e87a9 100644 --- a/source/device.cpp +++ b/source/device.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include "device.h" @@ -15,17 +8,22 @@ namespace AL { Device::Device() { - dev=alcOpenDevice(0); + dev = alcOpenDevice(0); if(!dev) throw Exception("Couldn't get OpenAL device"); } Device::Device(const string &spec) { - dev=alcOpenDevice(spec.c_str()); + dev = alcOpenDevice(spec.c_str()); if(!dev) throw Exception("Couldn't get OpenAL device"); } +Device::~Device() +{ + alcCloseDevice(dev); +} + } // namespace AL } // namespace Msp