 |
Gorgon Game Engine
|
Go to the documentation of this file.
3 #include "../Geometry/Point3D.h"
4 #include "../Geometry/Transform3D.h"
7 namespace Gorgon {
namespace Audio {
29 this->location = location;
39 this->orientation = location;
48 this->orientation = location;
89 attuniationfactor=value;
106 auricleangle = value;
108 left = { std::cos(PI-auricleangle), -std::sin(PI-auricleangle), 0};
109 right = { std::cos( auricleangle), -std::sin( auricleangle), 0};
114 if(index<0 || index>=4)
115 throw std::runtime_error(
"There are 4 speakers that can be configured");
117 speaker_locations[index] = value;
133 void updateorientation();
135 float unitspermeter = 1;
137 float speedofsound = 340.29f;
139 float recordingdistance = 1.f;
141 float attuniationfactor = 0.1f;
143 float maxdistance = 200.f;
145 float nonblocked = 0.2f;
147 float headradius = 0.15f;
149 float hrtfdistance = 0.666f;
153 float auricleangle = 0.0f;
163 float speaker_boost[4];
171 inline void Listener::poscalc() {
basic_Point3D CrossProduct(const basic_Point3D &other) const
Definition: Point3D.h:60
T_ Y
Definition: Point3D.h:67
friend void AudioLoop()
Definition: Audio.cpp:76
static Environment Current
Currently active environment.
Definition: Environment.h:128
basic_Point3D Normalize() const
Definition: Point3D.h:46
void SetLocation(const Geometry::Point3D &location)
Changes the current location of the listener, if automatic speed calculation is set,...
Definition: Environment.h:28
void SetAuricleAngle(float value)
Changes the difference of hearing direction cause by the auricles.
Definition: Environment.h:105
T_ Z
Definition: Point3D.h:68
void init()
Definition: X11.cpp:143
Environment()
Definition: Environment.h:83
void SetOrientation(const Geometry::Point3D &up, const Geometry::Point3D &orientation)
Changes the orientation of the listener.
Definition: Environment.h:37
friend void AudioLoop()
Definition: Audio.cpp:76
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Listener & GetListener()
Returns the current listener object.
Definition: Environment.h:123
friend class Listener
Definition: Environment.h:81
T_ X
Definition: Point3D.h:66
void SetAttuniationFactor(float value)
Changes the attunation factor, higher values will attunate sound more, causing a faster fall off.
Definition: Environment.h:88
The environment which the audio system works on.
Definition: Environment.h:79
Geometry::Point3D GetLocation() const
Returns the current location of the listener.
Definition: Environment.h:54
void SetNonBlocked(float value)
Changes the percent of sound not blocked by the head. This calculation might change in time.
Definition: Environment.h:100
Listener(Environment &env)
Definition: Environment.h:22
Listener class sets the properties for the audio listener.
Definition: Environment.h:17
Float Distance() const
Definition: Point3D.h:52
friend class Environment
Definition: Environment.h:19
void SetOrientation(const Geometry::Point3D &location)
Changes the orientation of the listener.
Definition: Environment.h:47
basic_Point3D< Float > Point3D
Definition: Point3D.h:84
basic_Transform3D< Float > Transform3D
Definition: Transform3D.h:176
void SetHeadRadius(float value)
Changes the radius of the head of listener.
Definition: Environment.h:93
void SetSpeakerLocation(int index, Geometry::Point3D value)
Sets the real world location of the speakers.
Definition: Environment.h:113