FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
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

◆ ActionAudio()

FIFE::ActionAudio::ActionAudio ( )

Definition at line 40 of file actionaudio.cpp.

References m_velocity.

◆ ~ActionAudio()

FIFE::ActionAudio::~ActionAudio ( )

Definition at line 61 of file actionaudio.cpp.

Member Function Documentation

◆ getConeInnerAngle()

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:

◆ getConeOuterAngle()

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:

◆ getConeOuterGain()

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:

◆ getGain()

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:

◆ getGroupName()

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:

◆ getMaxDistance()

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:

◆ getMaxGain()

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:

◆ getMinGain()

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:

◆ getPitch()

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:

◆ getReferenceDistance()

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:

◆ getRolloff()

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:

◆ getSoundFileName()

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:

◆ getVelocity()

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:

◆ isDirection()

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:

◆ isLooping()

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:

◆ isRelativePositioning()

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:

◆ setConeInnerAngle()

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:

◆ setConeOuterAngle()

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:

◆ setConeOuterGain()

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:

◆ setDirection()

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:

◆ setGain()

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:

◆ setGroupName()

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:

◆ setLooping()

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:

◆ setMaxDistance()

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:

◆ setMaxGain()

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:

◆ setMinGain()

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:

◆ setPitch()

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:

◆ setReferenceDistance()

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:

◆ setRelativePositioning()

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:

◆ setRolloff()

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:

◆ setSoundFileName()

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:

◆ setVelocity()

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

◆ m_coneInnerAngle

float FIFE::ActionAudio::m_coneInnerAngle
private

Definition at line 205 of file actionaudio.h.

Referenced by getConeInnerAngle(), and setConeInnerAngle().

◆ m_coneOuterAngle

float FIFE::ActionAudio::m_coneOuterAngle
private

Definition at line 206 of file actionaudio.h.

Referenced by getConeOuterAngle(), and setConeOuterAngle().

◆ m_coneOuterGain

float FIFE::ActionAudio::m_coneOuterGain
private

Definition at line 207 of file actionaudio.h.

Referenced by getConeOuterGain(), and setConeOuterGain().

◆ m_direction

bool FIFE::ActionAudio::m_direction
private

Definition at line 211 of file actionaudio.h.

Referenced by isDirection(), and setDirection().

◆ m_group

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

Definition at line 197 of file actionaudio.h.

Referenced by getGroupName(), and setGroupName().

◆ m_looping

bool FIFE::ActionAudio::m_looping
private

Definition at line 209 of file actionaudio.h.

Referenced by isLooping(), and setLooping().

◆ m_maxDistance

float FIFE::ActionAudio::m_maxDistance
private

Definition at line 202 of file actionaudio.h.

Referenced by getMaxDistance(), and setMaxDistance().

◆ m_maxVolume

float FIFE::ActionAudio::m_maxVolume
private

Definition at line 199 of file actionaudio.h.

Referenced by getMaxGain(), and setMaxGain().

◆ m_minVolume

float FIFE::ActionAudio::m_minVolume
private

Definition at line 200 of file actionaudio.h.

Referenced by getMinGain(), and setMinGain().

◆ m_name

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

Definition at line 196 of file actionaudio.h.

Referenced by getSoundFileName(), and setSoundFileName().

◆ m_pitch

float FIFE::ActionAudio::m_pitch
private

Definition at line 204 of file actionaudio.h.

Referenced by getPitch(), and setPitch().

◆ m_positioning

bool FIFE::ActionAudio::m_positioning
private

Definition at line 210 of file actionaudio.h.

Referenced by isRelativePositioning(), and setRelativePositioning().

◆ m_refDistance

float FIFE::ActionAudio::m_refDistance
private

Definition at line 201 of file actionaudio.h.

Referenced by getReferenceDistance(), and setReferenceDistance().

◆ m_rolloff

float FIFE::ActionAudio::m_rolloff
private

Definition at line 203 of file actionaudio.h.

Referenced by getRolloff(), and setRolloff().

◆ m_velocity

AudioSpaceCoordinate FIFE::ActionAudio::m_velocity
private

Definition at line 208 of file actionaudio.h.

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

◆ m_volume

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: