]> git.tdb.fi Git - libs/al.git/blobdiff - source/device.cpp
Style update: add spaces around assignments
[libs/al.git] / source / device.cpp
index 422b7ea2f8e055970c6ba9d6d9297c60a0f95e58..aea089790ca51251dc4acd3407a0e78880ece1d7 100644 (file)
@@ -2,7 +2,7 @@
 
 This file is part of libmspal
 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
-Diestributed under the LGPL
+Distributed under the LGPL
 */
 
 #include <msp/core/except.h>
@@ -15,17 +15,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