#ifndef AL_LISTENER_H #define AL_LISTENER_H #include #include #include "AL/al.h" #include "AL/alc.h" #include "AL/efx.h" #include "almalloc.h" struct ALlistener { std::array Position{{0.0f, 0.0f, 0.0f}}; std::array Velocity{{0.0f, 0.0f, 0.0f}}; std::array OrientAt{{0.0f, 0.0f, -1.0f}}; std::array OrientUp{{0.0f, 1.0f, 0.0f}}; float Gain{1.0f}; float mMetersPerUnit{AL_DEFAULT_METERS_PER_UNIT}; std::atomic_flag PropsClean; ALlistener() { PropsClean.test_and_set(std::memory_order_relaxed); } DISABLE_ALLOC() }; void UpdateListenerProps(ALCcontext *context); #endif