openal-soft/al/listener.h

33 lines
692 B
C
Raw Normal View History

2019-07-28 21:29:59 -07:00
#ifndef AL_LISTENER_H
#define AL_LISTENER_H
2007-11-13 18:02:18 -08:00
#include <array>
2019-07-28 21:29:59 -07:00
#include <atomic>
#include "AL/al.h"
2019-07-28 21:29:59 -07:00
#include "AL/alc.h"
2019-08-05 22:40:19 -07:00
#include "AL/efx.h"
2019-08-13 20:33:44 -07:00
#include "almalloc.h"
#include "atomic.h"
2007-11-13 18:02:18 -08:00
struct ALlistener {
std::array<float,3> Position{{0.0f, 0.0f, 0.0f}};
std::array<float,3> Velocity{{0.0f, 0.0f, 0.0f}};
std::array<float,3> OrientAt{{0.0f, 0.0f, -1.0f}};
std::array<float,3> OrientUp{{0.0f, 1.0f, 0.0f}};
float Gain{1.0f};
float mMetersPerUnit{AL_DEFAULT_METERS_PER_UNIT};
2012-10-09 06:19:36 -07:00
al::atomic_invflag mPropsDirty;
ALlistener() { mPropsDirty.test_and_clear(std::memory_order_relaxed); }
DISABLE_ALLOC()
};
2007-11-13 18:02:18 -08:00
void UpdateListenerProps(ALCcontext *context);
2007-11-13 18:02:18 -08:00
#endif