7 #ifndef CAFU_SOUND_IMPL_HPP_INCLUDED
8 #define CAFU_SOUND_IMPL_HPP_INCLUDED
10 #include "../Sound.hpp"
float OuterVolume
The sounds volume if listener is outside the sound cone.
Definition: SoundImpl.hpp:70
A mixer track represents/encapsulates/abstracs an OpenAL sound source.
Definition: MixerTrack.hpp:22
OpenAL implementation of the sound system.
Definition: SoundSysImpl.hpp:22
~SoundImplT()
The destructor. Deletes the sound by removing it from its current mixer track (if any) and buffer...
Definition: SoundImpl.cpp:40
void Pause()
Pauses the sound.
Definition: SoundImpl.cpp:67
bool Is3D() const
Checks if the sound is for 3D playback.
Definition: SoundImpl.cpp:94
void SetPriority(unsigned int Priority_)
Sets the priority of this sound.
Definition: SoundImpl.cpp:133
unsigned int Priority
Priority of the sound. Values <0 mean that the priority is not set and therefore obtained from the so...
Definition: SoundImpl.hpp:76
float GetOuterVolume() const
Gets the volume inside the outer sound cone.
Definition: SoundImpl.cpp:211
bool Play()
Plays the sound using the current sound system.
Definition: SoundImpl.cpp:50
void SetDirection(const Vector3dT &Direction_)
Sets the direction into which the sound source is moving.
Definition: SoundImpl.cpp:127
OpenAL implementation of the SoundI interface.
Definition: SoundImpl.hpp:21
bool IsPlaying() const
Checks if the sound is currently playing.
Definition: SoundImpl.cpp:85
void SetMinDistance(float MinDist_)
Sets the minimal distance.
Definition: SoundImpl.cpp:145
float GetOuterConeAngle() const
Sets the angle of the outer sound cone.
Definition: SoundImpl.cpp:205
Vector3dT Velocity
Velocity of the the object that emits this sound (only relevant if sound is 3D).
Definition: SoundImpl.hpp:67
float GetInnerConeAngle() const
Gets the angle of the inner sound cone.
Definition: SoundImpl.cpp:199
Vector3dT Direction
Direction of the sound (only relevant if ConeAngle (defined in shader) is smaller than 360 degree and...
Definition: SoundImpl.hpp:68
float OuterConeAngle
The outer angle of the cone outside which the sound is emited at outside volume.
Definition: SoundImpl.hpp:72
This class represents a sound.
Definition: Sound.hpp:15
const bool Is3DSound
Whether the sound is 2D or 3D.
Definition: SoundImpl.hpp:75
bool Resume()
Resumes a previously paused sound.
Definition: SoundImpl.cpp:73
unsigned int GetPriority() const
Gets the priority of this sound.
Definition: SoundImpl.cpp:175
A BufferT encapsulates an audio resource such as a file or a capture device.
Definition: Buffer.hpp:22
BufferT * Buffer
The buffer played by this sound.
Definition: SoundImpl.hpp:64
void ResetProperties()
Resets the sound properties to those of the shader it was created from.
Definition: SoundImpl.cpp:100
void SetInnerConeAngle(float InnerConeAngle_)
Sets the angle of the inner sound cone.
Definition: SoundImpl.cpp:157
void SetInnerVolume(float InnerVolume_)
Sets the volume.
Definition: SoundImpl.cpp:139
MixerTrackT * MixerTrack
The mixertrack on which this sound is played.
Definition: SoundImpl.hpp:65
SoundImplT(SoundSysImplT *SoundSys, bool Is3D_, const SoundShaderT *Shader_=NULL, BufferT *Buffer_=NULL)
The constructor.
Definition: SoundImpl.cpp:18
void SetOuterVolume(float OuterVolume_)
Sets the volume inside the outer sound cone.
Definition: SoundImpl.cpp:169
float InnerConeAngle
The inner angle of the cone in which the sound is emited at normal volume.
Definition: SoundImpl.hpp:71
void Stop()
Stops the sound.
Definition: SoundImpl.cpp:61
float MinDistance
The minimum distance that the sound will cease to continue growing louder at (stays at max...
Definition: SoundImpl.hpp:73
float MaxDistance
The maximum distance that the sound will cease to attenuate.
Definition: SoundImpl.hpp:74
void SetMaxDistance(float MaxDist_)
Sets the maximal distance.
Definition: SoundImpl.cpp:151
float InnerVolume
The volume of this sound (inside its sound cone/at minimal distance). 1.0 meaning 100% volume and 0...
Definition: SoundImpl.hpp:69
float GetMaxDistance() const
Gets the maximal distance.
Definition: SoundImpl.cpp:193
float GetMinDistance() const
Gets the minimal distance.
Definition: SoundImpl.cpp:187
void SetOuterConeAngle(float OuterConeAngle_)
Sets the angle of the outer sound cone.
Definition: SoundImpl.cpp:163
float GetInnerVolume() const
Gets the volume.
Definition: SoundImpl.cpp:181
void SetPosition(const Vector3dT &Position_)
Set the position from which the sound is emanating.
Definition: SoundImpl.cpp:115
Vector3dT Position
Position of this sound in the world (only relevant if sound is 3D).
Definition: SoundImpl.hpp:66
void SetVelocity(const Vector3dT &Velocity_)
Sets the velocity of the source that emits the sound.
Definition: SoundImpl.cpp:121
A SoundShader is a description of a sound with various properties.
Definition: SoundShader.hpp:19