]> git.tdb.fi Git - libs/al.git/blobdiff - source/listener.cpp
Initial revision
[libs/al.git] / source / listener.cpp
diff --git a/source/listener.cpp b/source/listener.cpp
new file mode 100644 (file)
index 0000000..04fc368
--- /dev/null
@@ -0,0 +1,39 @@
+/* $Id$
+
+This file is part of libmspal
+Copyright © 2008 Mikko Rasa, Mikkosoft Productions
+Diestributed under the LGPL
+*/
+
+#include "listener.h"
+
+namespace Msp {
+namespace AL {
+
+void Listener::attribute(ALenum attr, float v)
+{
+       alListenerf(attr, v);
+}
+
+void Listener::attribute(ALenum attr, float v0, float v1, float v2)
+{
+       alListener3f(attr, v0, v1, v2);
+}
+
+void Listener::attribute(ALenum attr, const float *v)
+{
+       alListenerfv(attr, v);
+}
+
+void Listener::set_position(float x, float y, float z)
+{
+       attribute(AL_POSITION, x, y, z);
+}
+
+void Listener::set_gain(float g)
+{
+       attribute(AL_GAIN, g);
+}
+
+} // namespace AL
+} // namespace Msp