FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
The EAX Reverb is similar to Reverb but supports more options. More...
#include <soundeffect.h>
Public Member Functions | |
EaxReverb () | |
Constructor. More... | |
void | setDensity (float value) |
Sets density, controls the coloration of the late reverb. More... | |
float | getDensity () const |
Return density value. More... | |
void | setDiffusion (float value) |
Sets diffusion, controls the echo density in the reverberation decay. More... | |
float | getDiffusion () const |
Return diffusion value. More... | |
void | setGain (float value) |
Sets gain, is the master volume control for the reflected sound. More... | |
float | getGain () const |
Return gain value. More... | |
void | setGainHf (float value) |
Sets gain hf, tweaks reflected sound by attenuating it at high frequencies. More... | |
float | getGainHf () const |
Return hf gain. More... | |
void | setGainLf (float value) |
Sets gain lf, tweaks reflected sound by attenuating it at low frequencies. More... | |
float | getGainLf () const |
Return lf gain. More... | |
void | setDecayTime (float value) |
The reverberation decay time. More... | |
float | getDecayTime () const |
Return decay time. More... | |
void | setDecayHfRatio (float value) |
Sets decay hf ratio, the spectral quality of the Decay Time parameter. More... | |
float | getDecayHfRatio () const |
Return decay hf ratio. More... | |
void | setDecayLfRatio (float value) |
Sets decay lf ratio, the spectral quality of the Decay Time parameter. More... | |
float | getDecayLfRatio () const |
Return decay lf ratio. More... | |
void | setReflectionsGain (float value) |
Sets reflections gain, the overall amount of initial reflections relative to the Gain property. More... | |
float | getReflectionsGain () const |
Return reflections gain. More... | |
void | setReflectionsDelay (float value) |
Sets the reflections delay, the amount of delay between the arrival time of the direct path from the source to the first reflection from the source. More... | |
float | getReflectionsDelay () const |
Return reflections delay. More... | |
void | setReflectionsPan (const AudioSpaceCoordinate &coordinate) |
Sets reflections pan, the 3D vector that controls the spatial distribution of the cluster of early reflections. More... | |
AudioSpaceCoordinate | getReflectionsPan () const |
Return reflections pan. More... | |
void | setLateReverbGain (float value) |
Sets late reverb gain, the overall amount of later reverberation relative to gain. More... | |
float | getLateReverbGain () const |
Return late reverb gain. More... | |
void | setLateReverbDelay (float value) |
Sets late reverb delay, the begin time of the late reverberation relative to the time of the initial reflection. More... | |
float | getLateReverbDelay () const |
Return late reverb delay. More... | |
void | setLateReverbPan (const AudioSpaceCoordinate &coordinate) |
Sets late reverb pan, the 3D vector that controls the spatial distribution of the late reverb. More... | |
AudioSpaceCoordinate | getLateReverbPan () const |
Return late reverb pan. More... | |
void | setEchoTime (float value) |
Sets echo time, the rate at which the cyclic echo repeats itself along the reverberation decay. More... | |
float | getEchoTime () const |
Return the echo time. More... | |
void | setEchoDepth (float value) |
Sets echo depth, the cyclic echo in the reverberation decay, which will be noticeable with transient or percussive sounds. More... | |
float | getEchoDepth () const |
Return echo depth. More... | |
void | setModulationTime (float value) |
Sets modulation time, the speed of the vibrato (rate of periodic changes in pitch). More... | |
float | getModulationTime () const |
Return modulation time. More... | |
void | setModulationDepth (float value) |
Sets modulation depth, the amount of pitch change. More... | |
float | getModulationDepth () const |
Return modulation depth. More... | |
void | setAirAbsorptionGainHf (float value) |
Sets air absorption gain hf, the distance-dependent attenuation at high frequencies caused by the propagation medium. More... | |
float | getAirAbsorptionGainHf () const |
Return air absorption gain hf. More... | |
void | setHfReference (float value) |
Sets hf reference, determine respectively the frequencies at which the high-frequency effects created by EAX Reverb properties are measured, for example Decay HF Ratio. More... | |
float | getHfReference () const |
Return hf reference. More... | |
void | setLfReference (float value) |
Sets lf reference, determine respectively the frequencies at which the low-frequency effects created by EAX Reverb properties are measured, for example Decay LF Ratio. More... | |
float | getLfReference () const |
Return lf reference. More... | |
void | setRoomRolloffFactor (float value) |
Sets room rolloff factor, similar to rolloff factor it attenuate the reflected sound (containing both reflections and reverberation) according to source-listener distance. More... | |
float | getRoomRolloffFactor () const |
Return room rolloff factor. More... | |
void | setDecayHfLimit (bool value) |
If decay hf limit is enabled, the high-frequency decay time automatically stays below a limit value that’s derived from the setting of Air Absorption HF. More... | |
bool | isDecayHfLimit () const |
Return if decay hf limit is enabled. More... | |
void | loadPreset (const EFXEAXREVERBPROPERTIES &prop) |
Load presets into the EAX reverb. More... | |
Public Member Functions inherited from FIFE::SoundEffect | |
SoundEffect () | |
Constructor. More... | |
virtual | ~SoundEffect () |
Destructor. More... | |
ALuint | getEffectId () const |
Return the OpenAL effect handle. More... | |
void | setSlotId (ALuint slot) |
Sets the OpenAL auxiliary slot handle. More... | |
ALuint | getSlotId () |
Return the OpenAL auxiliary slot handle. More... | |
SoundEffectType | getEffectType () const |
Return sound effect type. More... | |
void | setEnabled (bool enabled) |
Enables or disables the effect. More... | |
bool | isEnabled () const |
Return true if the effect is enabled, false otherwise. More... | |
void | setFilter (SoundFilter *filter) |
Sets the additional sound filter. More... | |
SoundFilter * | getFilter () |
Return sound filter or NULL. More... | |
Private Attributes | |
float | m_density |
float | m_diffusion |
float | m_gain |
float | m_gainHf |
float | m_gainLf |
float | m_decayTime |
float | m_decayHfRatio |
float | m_decayLfRatio |
float | m_reflectionsGain |
float | m_reflectionsDelay |
AudioSpaceCoordinate | m_reflectionsPan |
float | m_lateReverbGain |
float | m_lateReverbDelay |
AudioSpaceCoordinate | m_lateReverbPan |
float | m_echoTime |
float | m_echoDepth |
float | m_modulationTime |
float | m_modulationDepth |
float | m_airAbsorptionGainHf |
float | m_hfReference |
float | m_lfReference |
float | m_roomRolloffFactor |
bool | m_decayHfLimit |
Additional Inherited Members | |
Protected Attributes inherited from FIFE::SoundEffect | |
ALuint | m_effect |
Effect object id. More... | |
ALuint | m_slot |
Effect slot id;. More... | |
SoundEffectType | m_effectType |
Sound effect type. More... | |
bool | m_enabled |
Effect enabled. More... | |
SoundFilter * | m_filter |
Additional filter effect. More... | |
The EAX Reverb is similar to Reverb but supports more options.
There exists already over 100 presets for it. See SoundEffectPreset.
Definition at line 922 of file soundeffect.h.
FIFE::EaxReverb::EaxReverb | ( | ) |
Constructor.
Definition at line 933 of file soundeffect.cpp.
References FIFE::alEffecti, FIFE::SoundEffect::m_effect, FIFE::SoundEffect::m_effectType, and FIFE::SE_EFFECT_EAXREVERB.
float FIFE::EaxReverb::getAirAbsorptionGainHf | ( | ) | const |
Return air absorption gain hf.
Definition at line 1179 of file soundeffect.cpp.
References m_airAbsorptionGainHf.
float FIFE::EaxReverb::getDecayHfRatio | ( | ) | const |
float FIFE::EaxReverb::getDecayLfRatio | ( | ) | const |
float FIFE::EaxReverb::getDecayTime | ( | ) | const |
float FIFE::EaxReverb::getDensity | ( | ) | const |
float FIFE::EaxReverb::getDiffusion | ( | ) | const |
float FIFE::EaxReverb::getEchoDepth | ( | ) | const |
float FIFE::EaxReverb::getEchoTime | ( | ) | const |
float FIFE::EaxReverb::getGain | ( | ) | const |
float FIFE::EaxReverb::getGainHf | ( | ) | const |
float FIFE::EaxReverb::getGainLf | ( | ) | const |
float FIFE::EaxReverb::getHfReference | ( | ) | const |
float FIFE::EaxReverb::getLateReverbDelay | ( | ) | const |
Return late reverb delay.
Definition at line 1107 of file soundeffect.cpp.
References m_reflectionsDelay.
float FIFE::EaxReverb::getLateReverbGain | ( | ) | const |
Return late reverb gain.
Definition at line 1096 of file soundeffect.cpp.
References m_lateReverbGain.
AudioSpaceCoordinate FIFE::EaxReverb::getLateReverbPan | ( | ) | const |
Return late reverb pan.
Definition at line 1124 of file soundeffect.cpp.
References m_lateReverbPan.
float FIFE::EaxReverb::getLfReference | ( | ) | const |
float FIFE::EaxReverb::getModulationDepth | ( | ) | const |
Return modulation depth.
Definition at line 1168 of file soundeffect.cpp.
References m_modulationDepth.
float FIFE::EaxReverb::getModulationTime | ( | ) | const |
Return modulation time.
Definition at line 1157 of file soundeffect.cpp.
References m_modulationTime.
float FIFE::EaxReverb::getReflectionsDelay | ( | ) | const |
Return reflections delay.
Definition at line 1068 of file soundeffect.cpp.
References m_reflectionsDelay.
float FIFE::EaxReverb::getReflectionsGain | ( | ) | const |
Return reflections gain.
Definition at line 1057 of file soundeffect.cpp.
References m_reflectionsGain.
AudioSpaceCoordinate FIFE::EaxReverb::getReflectionsPan | ( | ) | const |
Return reflections pan.
Definition at line 1085 of file soundeffect.cpp.
References m_reflectionsPan.
float FIFE::EaxReverb::getRoomRolloffFactor | ( | ) | const |
Return room rolloff factor.
Definition at line 1212 of file soundeffect.cpp.
References m_roomRolloffFactor.
bool FIFE::EaxReverb::isDecayHfLimit | ( | ) | const |
Return if decay hf limit is enabled.
Definition at line 1221 of file soundeffect.cpp.
References m_decayHfLimit.
void FIFE::EaxReverb::loadPreset | ( | const EFXEAXREVERBPROPERTIES & | prop | ) |
Load presets into the EAX reverb.
Definition at line 1225 of file soundeffect.cpp.
References setAirAbsorptionGainHf(), setDecayHfLimit(), setDecayHfRatio(), setDecayLfRatio(), setDecayTime(), setDensity(), setDiffusion(), setEchoDepth(), setEchoTime(), setGain(), setGainHf(), setGainLf(), setHfReference(), setLateReverbDelay(), setLateReverbGain(), setLfReference(), setModulationDepth(), setModulationTime(), setReflectionsDelay(), setReflectionsGain(), and setRoomRolloffFactor().
Referenced by FIFE::SoundEffectManager::createSoundEffectPreset().
void FIFE::EaxReverb::setAirAbsorptionGainHf | ( | float | value | ) |
Sets air absorption gain hf, the distance-dependent attenuation at high frequencies caused by the propagation medium.
value | Range 0.892 to 1.0, default 0.994. |
Definition at line 1172 of file soundeffect.cpp.
References FIFE::alEffectf, m_airAbsorptionGainHf, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDecayHfLimit | ( | bool | value | ) |
If decay hf limit is enabled, the high-frequency decay time automatically stays below a limit value that’s derived from the setting of Air Absorption HF.
value | True or false. Default is true. |
Definition at line 1216 of file soundeffect.cpp.
References FIFE::alEffecti, m_decayHfLimit, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDecayHfRatio | ( | float | value | ) |
Sets decay hf ratio, the spectral quality of the Decay Time parameter.
It is the ratio of high-frequency decay time relative to the time set by Decay Time.
value | Range 0.1 to 2.0, default 0.83. |
Definition at line 1028 of file soundeffect.cpp.
References FIFE::alEffectf, m_decayHfRatio, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDecayLfRatio | ( | float | value | ) |
Sets decay lf ratio, the spectral quality of the Decay Time parameter.
It is the ratio of low-frequency decay time relative to the time set by Decay Time.
value | Range 0.1 to 2.0, default 1.0. |
Definition at line 1039 of file soundeffect.cpp.
References FIFE::alEffectf, m_decayLfRatio, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDecayTime | ( | float | value | ) |
The reverberation decay time.
value | Range 0.0 to 20.0, default 1.49 seconds. |
Definition at line 1017 of file soundeffect.cpp.
References FIFE::alEffectf, m_decayTime, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDensity | ( | float | value | ) |
Sets density, controls the coloration of the late reverb.
Lowering the value adds more coloration.
value | Range 0.0 to 1.0, default 1.0. |
Definition at line 962 of file soundeffect.cpp.
References FIFE::alEffectf, m_density, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setDiffusion | ( | float | value | ) |
Sets diffusion, controls the echo density in the reverberation decay.
value | Range 0.0 to 1.0, default 1.0. |
Definition at line 973 of file soundeffect.cpp.
References FIFE::alEffectf, m_diffusion, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setEchoDepth | ( | float | value | ) |
Sets echo depth, the cyclic echo in the reverberation decay, which will be noticeable with transient or percussive sounds.
value | Range 0.0 to 1.0, defult 0.0. |
Definition at line 1139 of file soundeffect.cpp.
References FIFE::alEffectf, m_echoDepth, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setEchoTime | ( | float | value | ) |
Sets echo time, the rate at which the cyclic echo repeats itself along the reverberation decay.
value | Range 0.075 to 0.25, default 0.25. |
Definition at line 1128 of file soundeffect.cpp.
References FIFE::alEffectf, m_echoTime, and FIFE::SoundEffect::m_effect.
Referenced by loadPreset().
void FIFE::EaxReverb::setGain | ( | float | value | ) |
Sets gain, is the master volume control for the reflected sound.
value | Range 0.0 to 1.0, default 0.32. |
Definition at line 984 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_gain.
Referenced by loadPreset().
void FIFE::EaxReverb::setGainHf | ( | float | value | ) |
Sets gain hf, tweaks reflected sound by attenuating it at high frequencies.
value | Range 0.0 to 1.0, default 0.89. |
Definition at line 995 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_gainHf.
Referenced by loadPreset().
void FIFE::EaxReverb::setGainLf | ( | float | value | ) |
Sets gain lf, tweaks reflected sound by attenuating it at low frequencies.
value | Range 0.0 to 1.0, default 0.0. |
Definition at line 1006 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_gainLf.
Referenced by loadPreset().
void FIFE::EaxReverb::setHfReference | ( | float | value | ) |
Sets hf reference, determine respectively the frequencies at which the high-frequency effects created by EAX Reverb properties are measured, for example Decay HF Ratio.
value | Range 1000.0 to 20000.0, default 5000.0 Hz. |
Definition at line 1183 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_hfReference.
Referenced by loadPreset().
void FIFE::EaxReverb::setLateReverbDelay | ( | float | value | ) |
Sets late reverb delay, the begin time of the late reverberation relative to the time of the initial reflection.
value | Range 0.0 to 0.1, default 0.011 seconds. |
Definition at line 1100 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_reflectionsDelay.
Referenced by loadPreset().
void FIFE::EaxReverb::setLateReverbGain | ( | float | value | ) |
Sets late reverb gain, the overall amount of later reverberation relative to gain.
value | Range 0.0 to 10.0, default 1.26. |
Definition at line 1089 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_lateReverbGain.
Referenced by loadPreset().
void FIFE::EaxReverb::setLateReverbPan | ( | const AudioSpaceCoordinate & | coordinate | ) |
Sets late reverb pan, the 3D vector that controls the spatial distribution of the late reverb.
The direction of this vector controls the global direction of the reverb, while its magnitude controls how focused the reverb are towards this direction.
coordinate | A 3D vector with values between 0.0 and 1.0. |
Definition at line 1111 of file soundeffect.cpp.
References FIFE::alEffectfv, FIFE::SoundEffect::m_effect, m_lateReverbPan, FIFE::PointType3D< T >::x, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.
void FIFE::EaxReverb::setLfReference | ( | float | value | ) |
Sets lf reference, determine respectively the frequencies at which the low-frequency effects created by EAX Reverb properties are measured, for example Decay LF Ratio.
Note: Should be less than 1/10 of HF Reference.
value | Range 20.0 to 1000.0 , default 250.0 Hz. |
Definition at line 1194 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_lfReference.
Referenced by loadPreset().
void FIFE::EaxReverb::setModulationDepth | ( | float | value | ) |
Sets modulation depth, the amount of pitch change.
value | Range 0.0 to 1.0, default 0.0. |
Definition at line 1161 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_modulationDepth.
Referenced by loadPreset().
void FIFE::EaxReverb::setModulationTime | ( | float | value | ) |
Sets modulation time, the speed of the vibrato (rate of periodic changes in pitch).
value | Range 0.004 to 4.0, default 0.25 seconds. |
Definition at line 1150 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_modulationTime.
Referenced by loadPreset().
void FIFE::EaxReverb::setReflectionsDelay | ( | float | value | ) |
Sets the reflections delay, the amount of delay between the arrival time of the direct path from the source to the first reflection from the source.
value | Range 0.0 to 0.3, default 0.007. |
Definition at line 1061 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_reflectionsDelay.
Referenced by loadPreset().
void FIFE::EaxReverb::setReflectionsGain | ( | float | value | ) |
Sets reflections gain, the overall amount of initial reflections relative to the Gain property.
value | Range 0.0 to 3.16, default 0.05. |
Definition at line 1050 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_reflectionsGain.
Referenced by loadPreset().
void FIFE::EaxReverb::setReflectionsPan | ( | const AudioSpaceCoordinate & | coordinate | ) |
Sets reflections pan, the 3D vector that controls the spatial distribution of the cluster of early reflections.
The direction of this vector controls the global direction of the reflections, while its magnitude controls how focused the reflections are towards this direction.
coordinate | A 3D vector with values between 0.0 and 1.0. |
Definition at line 1072 of file soundeffect.cpp.
References FIFE::alEffectfv, FIFE::SoundEffect::m_effect, m_reflectionsPan, FIFE::PointType3D< T >::x, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.
void FIFE::EaxReverb::setRoomRolloffFactor | ( | float | value | ) |
Sets room rolloff factor, similar to rolloff factor it attenuate the reflected sound (containing both reflections and reverberation) according to source-listener distance.
value | Range 0.0 to 10.0, default 0.0. |
Definition at line 1205 of file soundeffect.cpp.
References FIFE::alEffectf, FIFE::SoundEffect::m_effect, and m_roomRolloffFactor.
Referenced by loadPreset().
|
private |
Definition at line 1179 of file soundeffect.h.
Referenced by getAirAbsorptionGainHf(), and setAirAbsorptionGainHf().
|
private |
Definition at line 1183 of file soundeffect.h.
Referenced by isDecayHfLimit(), and setDecayHfLimit().
|
private |
Definition at line 1167 of file soundeffect.h.
Referenced by getDecayHfRatio(), and setDecayHfRatio().
|
private |
Definition at line 1168 of file soundeffect.h.
Referenced by getDecayLfRatio(), and setDecayLfRatio().
|
private |
Definition at line 1166 of file soundeffect.h.
Referenced by getDecayTime(), and setDecayTime().
|
private |
Definition at line 1161 of file soundeffect.h.
Referenced by getDensity(), and setDensity().
|
private |
Definition at line 1162 of file soundeffect.h.
Referenced by getDiffusion(), and setDiffusion().
|
private |
Definition at line 1176 of file soundeffect.h.
Referenced by getEchoDepth(), and setEchoDepth().
|
private |
Definition at line 1175 of file soundeffect.h.
Referenced by getEchoTime(), and setEchoTime().
|
private |
Definition at line 1163 of file soundeffect.h.
|
private |
Definition at line 1164 of file soundeffect.h.
Referenced by getGainHf(), and setGainHf().
|
private |
Definition at line 1165 of file soundeffect.h.
Referenced by getGainLf(), and setGainLf().
|
private |
Definition at line 1180 of file soundeffect.h.
Referenced by getHfReference(), and setHfReference().
|
private |
Definition at line 1173 of file soundeffect.h.
|
private |
Definition at line 1172 of file soundeffect.h.
Referenced by getLateReverbGain(), and setLateReverbGain().
|
private |
Definition at line 1174 of file soundeffect.h.
Referenced by getLateReverbPan(), and setLateReverbPan().
|
private |
Definition at line 1181 of file soundeffect.h.
Referenced by getLfReference(), and setLfReference().
|
private |
Definition at line 1178 of file soundeffect.h.
Referenced by getModulationDepth(), and setModulationDepth().
|
private |
Definition at line 1177 of file soundeffect.h.
Referenced by getModulationTime(), and setModulationTime().
|
private |
Definition at line 1170 of file soundeffect.h.
Referenced by getLateReverbDelay(), getReflectionsDelay(), setLateReverbDelay(), and setReflectionsDelay().
|
private |
Definition at line 1169 of file soundeffect.h.
Referenced by getReflectionsGain(), and setReflectionsGain().
|
private |
Definition at line 1171 of file soundeffect.h.
Referenced by getReflectionsPan(), and setReflectionsPan().
|
private |
Definition at line 1182 of file soundeffect.h.
Referenced by getRoomRolloffFactor(), and setRoomRolloffFactor().