SoundEnvironnement::SoundEnvironnement(const float& p_density, const float& p_diffusion, const float& p_gain, const float& p_gainHF, const float& p_decayTime, const float& p_decayHFRatio, const float& p_reflexionsGain, const float& p_reflexionsDelay, const float& p_lateReverbGain, const float& p_lateReverbDelay, const float& p_roomRollofFactor, const float& p_airAbsorptionGainHF, const bool& p_decayHFLimit) : m_density(1.0), m_diffusion(1.0), m_gain(0.32), m_gainHF(0.89), m_decayTime(1.49), m_decayHFRatio(0.83), m_reflexionsGain(0.05), m_reflexionsDelay(0.007), m_lateReverbGain(1.26), m_lateReverbDelay(0.011), m_roomRollofFactor(0.0), m_airAbsorptionGainHF(0.994), m_decayHFLimit(true) { setDensity(p_density) ; setDiffusion(p_diffusion) ; setGain(p_gain) ; setGainHF(p_gainHF) ; setDecayTime(p_decayTime) ; setDecayHFRatio(p_decayHFRatio) ; setReflexionsGain(p_reflexionsGain) ; setReflexionsDelay(p_reflexionsDelay) ; setLateReverbGain(p_lateReverbGain) ; setLateReverbDelay(p_lateReverbDelay) ; setRoomRollofFactor(p_roomRollofFactor) ; setAirAbsorptionGainHF(p_airAbsorptionGainHF) ; setDecayHFLimit(p_decayHFLimit) ; }
void EaxReverb::loadPreset(const EFXEAXREVERBPROPERTIES& prop) { // reflections and reverb pans are always 0 vectors, skip it setDensity(prop.flDensity); setDiffusion(prop.flDiffusion); setGain(prop.flGain); setGainHf(prop.flGainHF); setGainLf(prop.flGainLF); setDecayTime(prop.flDecayTime); setDecayHfRatio(prop.flDecayHFRatio); setDecayLfRatio(prop.flDecayLFRatio); setReflectionsGain(prop.flReflectionsGain); setReflectionsDelay(prop.flReflectionsDelay); setLateReverbGain(prop.flLateReverbGain); setLateReverbDelay(prop.flLateReverbDelay); setEchoTime(prop.flEchoTime); setEchoDepth(prop.flEchoDepth); setModulationTime(prop.flModulationTime); setModulationDepth(prop.flModulationDepth); setAirAbsorptionGainHf(prop.flAirAbsorptionGainHF); setHfReference(prop.flHFReference); setLfReference(prop.flLFReference); setRoomRolloffFactor(prop.flRoomRolloffFactor); setDecayHfLimit(prop.iDecayHFLimit ? true : false); }