FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::ActionAudio Class Reference

The class for holding audio data per Action. More...

#include <actionaudio.h>

+ Collaboration diagram for FIFE::ActionAudio:

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 AudioSpaceCoordinategetVelocity () 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
 

Detailed Description

The class for holding audio data per Action.

Definition at line 41 of file actionaudio.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

float FIFE::ActionAudio::getGain ( ) const

Returns the gain of the emitter.

Returns
The gain value. 0=silence ... 1.0=normal loudness.

Definition at line 84 of file actionaudio.cpp.

References m_volume.

Referenced by FIFE::SoundSource::updateSoundEmitter().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

float FIFE::ActionAudio::getMaxGain ( ) const

Returns the max.

gain of the emitter

Returns
The gain value. 0=silence ... 1.0=normal loudness.

Definition at line 92 of file actionaudio.cpp.

References m_maxVolume.

Referenced by FIFE::SoundSource::updateSoundEmitter().

+ Here is the caller graph for this function:

float FIFE::ActionAudio::getMinGain ( ) const

Returns the min.

gain of the emitter

Returns
The gain value. 0=silence ... 1.0=normal loudness.

Definition at line 100 of file actionaudio.cpp.

References m_minVolume.

Referenced by FIFE::SoundSource::updateSoundEmitter().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

bool FIFE::ActionAudio::isLooping ( ) const

Return playing mode.

Definition at line 172 of file actionaudio.cpp.

References m_looping.

Referenced by FIFE::SoundSource::updateSoundEmitter().

+ Here is the caller graph for this function:

bool FIFE::ActionAudio::isRelativePositioning ( ) const

Return Positioning-Type.

Definition at line 180 of file actionaudio.cpp.

References m_positioning.

Referenced by FIFE::SoundSource::updateSoundEmitter().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

void FIFE::ActionAudio::setGain ( float  gain)

Sets the gain of the emitter.

Parameters
gainThe gain value. 0=silence ... 1.0=normal loudness.

Definition at line 80 of file actionaudio.cpp.

References m_volume.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

void FIFE::ActionAudio::setMaxGain ( float  gain)

Sets the max.

gain of the emitter

Parameters
gainThe gain value. 0=silence ... 1.0=normal loudness.

Definition at line 88 of file actionaudio.cpp.

References m_maxVolume.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

void FIFE::ActionAudio::setMinGain ( float  gain)

Sets the min.

gain of the emitter

Parameters
gainThe gain value. 0=silence ... 1.0=normal loudness.

Definition at line 96 of file actionaudio.cpp.

References m_minVolume.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

void FIFE::ActionAudio::setRelativePositioning ( bool  relative)

Sets Positioning-Type Default is false.

Parameters
relativeIf 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().

+ Here is the caller graph for this function:

void FIFE::ActionAudio::setRolloff ( float  rolloff)

Sets the AL_ROLEOFF_FACTOR.

Rolloff factor judges the strength of attenuation over distance.

Parameters
rolloffRolloff 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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

Member Data Documentation

float FIFE::ActionAudio::m_coneInnerAngle
private

Definition at line 205 of file actionaudio.h.

Referenced by getConeInnerAngle(), and setConeInnerAngle().

float FIFE::ActionAudio::m_coneOuterAngle
private

Definition at line 206 of file actionaudio.h.

Referenced by getConeOuterAngle(), and setConeOuterAngle().

float FIFE::ActionAudio::m_coneOuterGain
private

Definition at line 207 of file actionaudio.h.

Referenced by getConeOuterGain(), and setConeOuterGain().

bool FIFE::ActionAudio::m_direction
private

Definition at line 211 of file actionaudio.h.

Referenced by isDirection(), and setDirection().

std::string FIFE::ActionAudio::m_group
private

Definition at line 197 of file actionaudio.h.

Referenced by getGroupName(), and setGroupName().

bool FIFE::ActionAudio::m_looping
private

Definition at line 209 of file actionaudio.h.

Referenced by isLooping(), and setLooping().

float FIFE::ActionAudio::m_maxDistance
private

Definition at line 202 of file actionaudio.h.

Referenced by getMaxDistance(), and setMaxDistance().

float FIFE::ActionAudio::m_maxVolume
private

Definition at line 199 of file actionaudio.h.

Referenced by getMaxGain(), and setMaxGain().

float FIFE::ActionAudio::m_minVolume
private

Definition at line 200 of file actionaudio.h.

Referenced by getMinGain(), and setMinGain().

std::string FIFE::ActionAudio::m_name
private

Definition at line 196 of file actionaudio.h.

Referenced by getSoundFileName(), and setSoundFileName().

float FIFE::ActionAudio::m_pitch
private

Definition at line 204 of file actionaudio.h.

Referenced by getPitch(), and setPitch().

bool FIFE::ActionAudio::m_positioning
private

Definition at line 210 of file actionaudio.h.

Referenced by isRelativePositioning(), and setRelativePositioning().

float FIFE::ActionAudio::m_refDistance
private

Definition at line 201 of file actionaudio.h.

Referenced by getReferenceDistance(), and setReferenceDistance().

float FIFE::ActionAudio::m_rolloff
private

Definition at line 203 of file actionaudio.h.

Referenced by getRolloff(), and setRolloff().

AudioSpaceCoordinate FIFE::ActionAudio::m_velocity
private

Definition at line 208 of file actionaudio.h.

Referenced by ActionAudio(), getVelocity(), and setVelocity().

float FIFE::ActionAudio::m_volume
private

Definition at line 198 of file actionaudio.h.

Referenced by getGain(), and setGain().


The documentation for this class was generated from the following files: