FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
The class for holding audio data per Action. More...
#include <actionaudio.h>
Public Member Functions | |
ActionAudio () | |
~ActionAudio () | |
void | setSoundFileName (const std::string &name) |
Sets the name of the sound file. More... | |
const std::string & | getSoundFileName () const |
Return the name of the sound file. More... | |
void | setGroupName (const std::string &name) |
Sets the name of the group to which the emitter is added. More... | |
const std::string & | getGroupName () const |
Return the name of the group to which the emitter is added. More... | |
void | setGain (float gain) |
Sets the gain of the emitter. More... | |
float | getGain () const |
Returns the gain of the emitter. More... | |
void | setMaxGain (float gain) |
Sets the max. More... | |
float | getMaxGain () const |
Returns the max. More... | |
void | setMinGain (float gain) |
Sets the min. More... | |
float | getMinGain () const |
Returns the min. More... | |
void | setReferenceDistance (float distance) |
Sets the distance under which the volume for the SoundEmitter would normally drop by half (before being influenced by rolloff factor or max distance. More... | |
float | getReferenceDistance () const |
Return the reference distance. More... | |
void | setMaxDistance (float distance) |
Sets the max distance used with the Inverse Clamped Distance Model to set the distance where there will no longer be any attenuation of the source. More... | |
float | getMaxDistance () const |
Return the max distance. More... | |
void | setRolloff (float rolloff) |
Sets the AL_ROLEOFF_FACTOR. More... | |
float | getRolloff () const |
Return the AL_ROLEOFF_FACTOR. More... | |
void | setPitch (float pitch) |
Sets pitch multiplier. More... | |
float | getPitch () const |
Return pitch multiplier. More... | |
void | setConeInnerAngle (float inner) |
Sets inner angle of the sound cone, in degrees. More... | |
float | getConeInnerAngle () const |
Return inner angle of the sound cone, in degrees. More... | |
void | setConeOuterAngle (float outer) |
Sets outer angle of the sound cone, in degrees. More... | |
float | getConeOuterAngle () const |
Return outer angle of the sound cone, in degrees. More... | |
void | setConeOuterGain (float gain) |
Sets the gain when outside the oriented cone. More... | |
float | getConeOuterGain () const |
Return the gain when outside the oriented cone. More... | |
void | setVelocity (const AudioSpaceCoordinate &velocity) |
Sets the velocity of the SoundEmitter in the virtual audio space. More... | |
const AudioSpaceCoordinate & | getVelocity () const |
Return the velocity of the SoundEmitter in the virtual audio space. More... | |
void | setLooping (bool loop) |
Sets the playing mode. More... | |
bool | isLooping () const |
Return playing mode. More... | |
void | setRelativePositioning (bool relative) |
Sets Positioning-Type Default is false. More... | |
bool | isRelativePositioning () const |
Return Positioning-Type. More... | |
void | setDirection (bool direction) |
Sets if the sound should use the instance direction. More... | |
bool | isDirection () const |
Return true if the Instance direction is used, false for undirected. More... | |
Private Attributes | |
std::string | m_name |
std::string | m_group |
float | m_volume |
float | m_maxVolume |
float | m_minVolume |
float | m_refDistance |
float | m_maxDistance |
float | m_rolloff |
float | m_pitch |
float | m_coneInnerAngle |
float | m_coneOuterAngle |
float | m_coneOuterGain |
AudioSpaceCoordinate | m_velocity |
bool | m_looping |
bool | m_positioning |
bool | m_direction |
The class for holding audio data per Action.
Definition at line 41 of file actionaudio.h.
FIFE::ActionAudio::ActionAudio | ( | ) |
Definition at line 40 of file actionaudio.cpp.
References m_velocity.
FIFE::ActionAudio::~ActionAudio | ( | ) |
Definition at line 61 of file actionaudio.cpp.
float FIFE::ActionAudio::getConeInnerAngle | ( | ) | const |
Return inner angle of the sound cone, in degrees.
Definition at line 140 of file actionaudio.cpp.
References m_coneInnerAngle.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getConeOuterAngle | ( | ) | const |
Return outer angle of the sound cone, in degrees.
Definition at line 148 of file actionaudio.cpp.
References m_coneOuterAngle.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getConeOuterGain | ( | ) | const |
Return the gain when outside the oriented cone.
Definition at line 156 of file actionaudio.cpp.
References m_coneOuterGain.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getGain | ( | ) | const |
Returns the gain of the emitter.
Definition at line 84 of file actionaudio.cpp.
References m_volume.
Referenced by FIFE::SoundSource::updateSoundEmitter().
const std::string & FIFE::ActionAudio::getGroupName | ( | ) | const |
Return the name of the group to which the emitter is added.
Definition at line 76 of file actionaudio.cpp.
References m_group.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getMaxDistance | ( | ) | const |
Return the max distance.
Definition at line 116 of file actionaudio.cpp.
References m_maxDistance.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getMaxGain | ( | ) | const |
Returns the max.
gain of the emitter
Definition at line 92 of file actionaudio.cpp.
References m_maxVolume.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getMinGain | ( | ) | const |
Returns the min.
gain of the emitter
Definition at line 100 of file actionaudio.cpp.
References m_minVolume.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getPitch | ( | ) | const |
Return pitch multiplier.
Can only be positiv.
Definition at line 132 of file actionaudio.cpp.
References m_pitch.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getReferenceDistance | ( | ) | const |
Return the reference distance.
Definition at line 108 of file actionaudio.cpp.
References m_refDistance.
Referenced by FIFE::SoundSource::updateSoundEmitter().
float FIFE::ActionAudio::getRolloff | ( | ) | const |
Return the AL_ROLEOFF_FACTOR.
Rolloff factor judges the strength of attenuation over distance.
Definition at line 124 of file actionaudio.cpp.
References m_rolloff.
Referenced by FIFE::SoundSource::updateSoundEmitter().
const std::string & FIFE::ActionAudio::getSoundFileName | ( | ) | const |
Return the name of the sound file.
Definition at line 68 of file actionaudio.cpp.
References m_name.
Referenced by FIFE::SoundSource::updateSoundEmitter().
const AudioSpaceCoordinate & FIFE::ActionAudio::getVelocity | ( | ) | const |
Return the velocity of the SoundEmitter in the virtual audio space.
Definition at line 164 of file actionaudio.cpp.
References m_velocity.
Referenced by FIFE::SoundSource::updateSoundEmitter().
bool FIFE::ActionAudio::isDirection | ( | ) | const |
Return true if the Instance direction is used, false for undirected.
Definition at line 188 of file actionaudio.cpp.
References m_direction.
Referenced by FIFE::SoundSource::setDirection().
bool FIFE::ActionAudio::isLooping | ( | ) | const |
Return playing mode.
Definition at line 172 of file actionaudio.cpp.
References m_looping.
Referenced by FIFE::SoundSource::updateSoundEmitter().
bool FIFE::ActionAudio::isRelativePositioning | ( | ) | const |
Return Positioning-Type.
Definition at line 180 of file actionaudio.cpp.
References m_positioning.
Referenced by FIFE::SoundSource::updateSoundEmitter().
void FIFE::ActionAudio::setConeInnerAngle | ( | float | inner | ) |
Sets inner angle of the sound cone, in degrees.
Default 360
Definition at line 136 of file actionaudio.cpp.
References m_coneInnerAngle.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setConeOuterAngle | ( | float | outer | ) |
Sets outer angle of the sound cone, in degrees.
Default 360
Definition at line 144 of file actionaudio.cpp.
References m_coneOuterAngle.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setConeOuterGain | ( | float | gain | ) |
Sets the gain when outside the oriented cone.
Definition at line 152 of file actionaudio.cpp.
References m_coneOuterGain.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setDirection | ( | bool | direction | ) |
Sets if the sound should use the instance direction.
Definition at line 184 of file actionaudio.cpp.
References m_direction.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setGain | ( | float | gain | ) |
Sets the gain of the emitter.
gain | The gain value. 0=silence ... 1.0=normal loudness. |
Definition at line 80 of file actionaudio.cpp.
References m_volume.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setGroupName | ( | const std::string & | name | ) |
Sets the name of the group to which the emitter is added.
Definition at line 72 of file actionaudio.cpp.
References m_group.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setLooping | ( | bool | loop | ) |
Sets the playing mode.
Definition at line 168 of file actionaudio.cpp.
References m_looping.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setMaxDistance | ( | float | distance | ) |
Sets the max distance used with the Inverse Clamped Distance Model to set the distance where there will no longer be any attenuation of the source.
Definition at line 112 of file actionaudio.cpp.
References utf8::distance(), and m_maxDistance.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setMaxGain | ( | float | gain | ) |
Sets the max.
gain of the emitter
gain | The gain value. 0=silence ... 1.0=normal loudness. |
Definition at line 88 of file actionaudio.cpp.
References m_maxVolume.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setMinGain | ( | float | gain | ) |
Sets the min.
gain of the emitter
gain | The gain value. 0=silence ... 1.0=normal loudness. |
Definition at line 96 of file actionaudio.cpp.
References m_minVolume.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setPitch | ( | float | pitch | ) |
Sets pitch multiplier.
Can only be positiv.
Definition at line 128 of file actionaudio.cpp.
References m_pitch.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setReferenceDistance | ( | float | distance | ) |
Sets the distance under which the volume for the SoundEmitter would normally drop by half (before being influenced by rolloff factor or max distance.
Definition at line 104 of file actionaudio.cpp.
References utf8::distance(), and m_refDistance.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setRelativePositioning | ( | bool | relative | ) |
Sets Positioning-Type Default is false.
relative | If set to true, the emitters position will be interpreted relative to the listener object |
Definition at line 176 of file actionaudio.cpp.
References m_positioning.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setRolloff | ( | float | rolloff | ) |
Sets the AL_ROLEOFF_FACTOR.
Rolloff factor judges the strength of attenuation over distance.
rolloff | Rolloff factor. You'll need to do a lot of testing to find a value which suits your needs. |
Definition at line 120 of file actionaudio.cpp.
References m_rolloff.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setSoundFileName | ( | const std::string & | name | ) |
Sets the name of the sound file.
Definition at line 64 of file actionaudio.cpp.
References m_name.
Referenced by FIFE::ObjectLoader::load().
void FIFE::ActionAudio::setVelocity | ( | const AudioSpaceCoordinate & | velocity | ) |
Sets the velocity of the SoundEmitter in the virtual audio space.
Definition at line 160 of file actionaudio.cpp.
References m_velocity.
Referenced by FIFE::ObjectLoader::load().
|
private |
Definition at line 205 of file actionaudio.h.
Referenced by getConeInnerAngle(), and setConeInnerAngle().
|
private |
Definition at line 206 of file actionaudio.h.
Referenced by getConeOuterAngle(), and setConeOuterAngle().
|
private |
Definition at line 207 of file actionaudio.h.
Referenced by getConeOuterGain(), and setConeOuterGain().
|
private |
Definition at line 211 of file actionaudio.h.
Referenced by isDirection(), and setDirection().
|
private |
Definition at line 197 of file actionaudio.h.
Referenced by getGroupName(), and setGroupName().
|
private |
Definition at line 209 of file actionaudio.h.
Referenced by isLooping(), and setLooping().
|
private |
Definition at line 202 of file actionaudio.h.
Referenced by getMaxDistance(), and setMaxDistance().
|
private |
Definition at line 199 of file actionaudio.h.
Referenced by getMaxGain(), and setMaxGain().
|
private |
Definition at line 200 of file actionaudio.h.
Referenced by getMinGain(), and setMinGain().
|
private |
Definition at line 196 of file actionaudio.h.
Referenced by getSoundFileName(), and setSoundFileName().
|
private |
Definition at line 204 of file actionaudio.h.
Referenced by getPitch(), and setPitch().
|
private |
Definition at line 210 of file actionaudio.h.
Referenced by isRelativePositioning(), and setRelativePositioning().
|
private |
Definition at line 201 of file actionaudio.h.
Referenced by getReferenceDistance(), and setReferenceDistance().
|
private |
Definition at line 203 of file actionaudio.h.
Referenced by getRolloff(), and setRolloff().
|
private |
Definition at line 208 of file actionaudio.h.
Referenced by ActionAudio(), getVelocity(), and setVelocity().
|
private |
Definition at line 198 of file actionaudio.h.