X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flistener.h;h=ae222ae7bf7e5233ab8a06140dbe3a1f398807a1;hb=refs%2Fheads%2Fmaster;hp=0fe3d818b8e4f2f23644d4d9027e87e7db849264;hpb=2ff6e1cc7fcae3099b127a886360d7919a4b3efa;p=libs%2Fal.git diff --git a/source/listener.h b/source/listener.h index 0fe3d81..ae222ae 100644 --- a/source/listener.h +++ b/source/listener.h @@ -1,32 +1,28 @@ -/* $Id$ - -This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#ifndef MSP_AL_LIStENER_H_ +#ifndef MSP_AL_LISTENER_H_ #define MSP_AL_LISTENER_H_ -#include +#include "al.h" namespace Msp { namespace AL { /** -Represents the listener in the 3D environment. There is only one listener in -OpenAL - this class is not instantiable and all of its functions are static. +Represents the listener in the 3D environment. This class is a singleton. */ class Listener { private: + float orientation[6]; + Listener(); public: - static void attribute(ALenum, float); - static void attribute(ALenum, float, float, float); - static void attribute(ALenum, const float *); - static void set_position(float, float, float); - static void set_gain(float); + static Listener &instance(); + + void set_position(float, float, float); + void set_forward_direction(float, float, float); + void set_up_direction(float, float, float); + void set_velocity(float, float, float); + void set_gain(float); }; } // namespace AL