4 #include <OpenAL/alc.h>
5 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(_WIN32) || defined(__HAIKU__)
10 #include <unordered_map>
18 using std::unordered_map;
148 return audioEntityIt->second;
Interface to audio module.
Vector3 listenerOrientationAt
AudioEntity * getEntity(const string &id)
Returns an audio entity identified by given id.
void setListenerOrientationAt(const Vector3 &listenerOrientationAt)
Set listener orientation at.
void addEntity(AudioEntity *entity)
Adds a audio entity.
Vector3 listenerOrientationUp
static constexpr uint32_t ALSOURCEID_NONE
unordered_map< string, AudioEntity * > audioEntities
static void shutdown()
Shuts the audio down.
void setListenerVelocity(const Vector3 &listenerVelocity)
Set listener velocity.
void setListenerOrientationUp(const Vector3 &listenerOrientationUp)
Set listener orientation up.
const Vector3 & getListenerOrientationAt() const
static constexpr uint32_t ALBUFFERID_NONE
void removeEntity(const string &id)
Removes an audio entity.
const Vector3 & getListenerVelocity() const
const Vector3 & getListenerPosition() const
const Vector3 & getListenerOrientationUp() const
void update()
Update and transfer audio entity states to open AL.
static STATIC_DLL_IMPEXT Audio * instance
static Audio * getInstance()
void reset()
Clears all audio entities.
~Audio()
Private destructor.
AudioBufferManager audioBufferManager
Audio()
Private constructor.
void setListenerPosition(const Vector3 &listenerPosition)
Set listener position.
Sound audio entity implementation.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
#define STATIC_DLL_IMPEXT
#define FORBID_CLASS_COPY(CLASS)