sfxEnvironment.cpp
Engine/source/sfx/sfxEnvironment.cpp
Public Variables
Public Functions
ConsoleDocClass(SFXEnvironment , "@brief Description of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> reverb <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">environment.\n\n</a>" "A reverb environment specifies how the audio mixer should <a href="/coding/file/editortool_8cpp/#editortool_8cpp_1a4cb041169a32ea3d4cacadbb955e06b4">render</a> advanced environmental audio " "effects. \<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "To use reverb environments in your level, set up one or more ambient audio spaces, assign " "reverb environments appropriately, and then attach the SFXAmbiences <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> your <a href="/coding/class/classlevelinfo/">LevelInfo</a>(taking effect " "globally) or <a href="/coding/class/classzone/">Zone</a> objects(taking effect locally).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "To define your own custom reverb environments, it is usually easiest <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> adapt one of the pre-existing " "reverb <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">definitions:\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample_nopar\n</a>" "singleton <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a>(AudioEnvCustomUnderwater :AudioEnvUnderwater)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Override select properties from AudioEnvUnderwater <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">here.\n</a>" "};\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "In the Datablock Editor, this can be done by selecting an existing environment <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy from when creating " "the <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">datablock.\n\n</a>" "For <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> precise description of reverb audio and the properties of this class, please consult the EAX " "<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">documentation.\n\n</a>" "All <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a> instances are automatically added <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the global @c <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFXEnvironmentSet.\n\n</a>" " @see http://www.atc.creative.com/algorithms/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">eax20.pdf\n</a>" " @see http://connect.creativelabs.com/developer/Gaming/Forms/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">AllItems.aspx\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFXAmbience::environment\n\n</a>" " @ref <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFX_reverb\n</a>" " @ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFX\n</a>" )
Detailed Description
Public Variables
const U32 sReverbFlagCore0
const U32 sReverbFlagCore1
const U32 sReverbFlagDecayHFLimit
const U32 sReverbFlagDecayTimeScale
const U32 sReverbFlagEchoTimeScale
const U32 sReverbFlagHighQualityDPL2Reverb
const U32 sReverbFlagHighQualityReverb
const U32 sReverbFlagModulationTimeScale
const U32 sReverbFlagReflectionsScale
const U32 sReverbFlagReverbDelayScale
const U32 sReverbFlagReverbScale
Public Functions
AFTER_MODULE_INIT(SFX )
ConsoleDocClass(SFXEnvironment , "@brief Description of <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> reverb <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">environment.\n\n</a>" "A reverb environment specifies how the audio mixer should <a href="/coding/file/editortool_8cpp/#editortool_8cpp_1a4cb041169a32ea3d4cacadbb955e06b4">render</a> advanced environmental audio " "effects. \<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "To use reverb environments in your level, set up one or more ambient audio spaces, assign " "reverb environments appropriately, and then attach the SFXAmbiences <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> your <a href="/coding/class/classlevelinfo/">LevelInfo</a>(taking effect " "globally) or <a href="/coding/class/classzone/">Zone</a> objects(taking effect locally).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" "To define your own custom reverb environments, it is usually easiest <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> adapt one of the pre-existing " "reverb <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">definitions:\n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">tsexample_nopar\n</a>" "singleton <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a>(AudioEnvCustomUnderwater :AudioEnvUnderwater)\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "{\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "//Override select properties from AudioEnvUnderwater <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">here.\n</a>" "};\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" " @<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">endtsexample\n\n</a>" "In the Datablock Editor, this can be done by selecting an existing environment <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> copy from when creating " "the <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">datablock.\n\n</a>" "For <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> precise description of reverb audio and the properties of this class, please consult the EAX " "<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">documentation.\n\n</a>" "All <a href="/coding/class/classsfxenvironment/">SFXEnvironment</a> instances are automatically added <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the global @c <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFXEnvironmentSet.\n\n</a>" " @see http://www.atc.creative.com/algorithms/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">eax20.pdf\n</a>" " @see http://connect.creativelabs.com/developer/Gaming/Forms/<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">AllItems.aspx\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFXAmbience::environment\n\n</a>" " @ref <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFX_reverb\n</a>" " @ingroup <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">SFX\n</a>" )
IMPLEMENT_CO_DATABLOCK_V1(SFXEnvironment )
1 2//----------------------------------------------------------------------------- 3// Copyright (c) 2012 GarageGames, LLC 4// 5// Permission is hereby granted, free of charge, to any person obtaining a copy 6// of this software and associated documentation files (the "Software"), to 7// deal in the Software without restriction, including without limitation the 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9// sell copies of the Software, and to permit persons to whom the Software is 10// furnished to do so, subject to the following conditions: 11// 12// The above copyright notice and this permission notice shall be included in 13// all copies or substantial portions of the Software. 14// 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21// IN THE SOFTWARE. 22//----------------------------------------------------------------------------- 23 24#include "sfx/sfxEnvironment.h" 25#include "sim/netConnection.h" 26#include "core/stream/bitStream.h" 27#include "core/module.h" 28 29 30IMPLEMENT_CO_DATABLOCK_V1( SFXEnvironment ); 31 32 33// Reverb flags. 34static const U32 sReverbFlagDecayTimeScale = 0x001; 35static const U32 sReverbFlagReflectionsScale = 0x002; 36//static const U32 sReverbFlagReflectionsDelayScale = 0x004; unused, but kept for doc purposes -BJR 37static const U32 sReverbFlagReverbScale = 0x008; 38static const U32 sReverbFlagReverbDelayScale = 0x010; 39static const U32 sReverbFlagDecayHFLimit = 0x020; 40static const U32 sReverbFlagEchoTimeScale = 0x040; 41static const U32 sReverbFlagModulationTimeScale = 0x080; 42static const U32 sReverbFlagCore0 = 0x100; 43static const U32 sReverbFlagCore1 = 0x200; 44static const U32 sReverbFlagHighQualityReverb = 0x400; 45static const U32 sReverbFlagHighQualityDPL2Reverb = 0x800; 46 47AFTER_MODULE_INIT( SFX ) 48{ 49 Con::addConstant( "SFXEnvironment::REVERB_DECAYTIMESCALE", TypeS32, &sReverbFlagDecayTimeScale, 50 "SFXEnvironment::envSize affects reverberation decay time.\n" 51 "@see SFXEnvironment::flags\n\n" 52 "@ingroup SFXEnvironment" ); 53 Con::addConstant( "SFXEnvironment::REVERB_REFLECTIONSSCALE", TypeS32, &sReverbFlagReflectionsScale, 54 "SFXEnvironment::envSize affects reflection level.\n" 55 "@see SFXEnvironment::flags\n\n" 56 "@ingroup SFXEnvironment" ); 57 Con::addConstant( "SFXEnvironment::REVERB_REFLECTIONSDELAYSCALE", TypeS32, &sReverbFlagReflectionsScale, 58 "SFXEnvironment::envSize affects initial reflection delay time.\n" 59 "@see SFXEnvironment::flags\n\n" 60 "@ingroup SFXEnvironment" ); 61 Con::addConstant( "SFXEnvironment::REVERB_REVERBSCALE", TypeS32, &sReverbFlagReverbScale, 62 "SFXEnvironment::envSize affects reflections level.\n" 63 "@see SFXEnvironment::flags\n\n" 64 "@ingroup SFXEnvironment" ); 65 Con::addConstant( "SFXEnvironment::REVERB_REVERBDELAYSCALE", TypeS32, &sReverbFlagReverbDelayScale, 66 "SFXEnvironment::envSize affects late reverberation delay time.\n" 67 "@see SFXEnvironment::flags\n\n" 68 "@ingroup SFXEnvironment" ); 69 Con::addConstant( "SFXEnvironment::REVERB_DECAYHFLIMIT", TypeS32, &sReverbFlagDecayHFLimit, 70 "SFXEnvironment::airAbsorptionHF affects SFXEnvironment::decayHFRatio.\n" 71 "@see SFXEnvironment::flags\n\n" 72 "@ingroup SFXEnvironment" ); 73 Con::addConstant( "SFXEnvironment::REVERB_ECHOTIMESCALE", TypeS32, &sReverbFlagEchoTimeScale, 74 "SFXEnvironment::envSize affects echo time.\n" 75 "@see SFXEnvironment::flags\n\n" 76 "@ingroup SFXEnvironment" ); 77 Con::addConstant( "SFXEnvironment::REVERB_MODULATIONTIMESCALE", TypeS32, &sReverbFlagModulationTimeScale, 78 "SFXEnvironment::envSize affects modulation time.\n" 79 "@see SFXEnvironment::flags\n\n" 80 "@ingroup SFXEnvironment" ); 81 Con::addConstant( "SFXEnvironment::REVERB_CORE0", TypeS32, &sReverbFlagCore0, 82 "PS2 Only - Reverb is applied to CORE0 (hw voices 0-23).\n" 83 "@see SFXEnvironment::flags\n\n" 84 "@ingroup SFXEnvironment" ); 85 Con::addConstant( "SFXEnvironment::REVERB_CORE1", TypeS32, &sReverbFlagCore1, 86 "PS2 Only - Reverb is applied to CORE1 (hw voices 24-47).\n" 87 "@see SFXEnvironment::flags\n\n" 88 "@ingroup SFXEnvironment" ); 89 Con::addConstant( "SFXEnvironment::REVERB_HIGHQUALITYREVERB", TypeS32, &sReverbFlagHighQualityReverb, 90 "GameCube/Wii Only - Use high-quality reverb.\n" 91 "@see SFXEnvironment::flags\n\n" 92 "@ingroup SFXEnvironment" ); 93 Con::addConstant( "SFXEnvironment::REVERB_HIGHQUALITYDPL2REVERB", TypeS32, &sReverbFlagHighQualityDPL2Reverb, 94 "GameCube/Wii Only - Use high-quality DPL2 reverb.\n" 95 "@see SFXEnvironment::flags\n\n" 96 "@ingroup SFXEnvironment" ); 97} 98 99 100ConsoleDocClass( SFXEnvironment, 101 "@brief Description of a reverb environment.\n\n" 102 103 "A reverb environment specifies how the audio mixer should render advanced environmental audio " 104 "effects. \n\n" 105 106 "To use reverb environments in your level, set up one or more ambient audio spaces, assign " 107 "reverb environments appropriately, and then attach the SFXAmbiences to your LevelInfo (taking effect " 108 "globally) or Zone objects (taking effect locally).\n\n" 109 110 "To define your own custom reverb environments, it is usually easiest to adapt one of the pre-existing " 111 "reverb definitions:\n" 112 113 "@tsexample_nopar\n" 114 "singleton SFXEnvironment( AudioEnvCustomUnderwater : AudioEnvUnderwater )\n" 115 "{\n" 116 " // Override select properties from AudioEnvUnderwater here.\n" 117 "};\n" 118 "@endtsexample\n\n" 119 120 "In the Datablock Editor, this can be done by selecting an existing environment to copy from when creating " 121 "the SFXEnvironment datablock.\n\n" 122 123 "For a precise description of reverb audio and the properties of this class, please consult the EAX " 124 "documentation.\n\n" 125 126 "All SFXEnvironment instances are automatically added to the global @c SFXEnvironmentSet.\n\n" 127 128 "@see http://www.atc.creative.com/algorithms/eax20.pdf\n" 129 "@see http://connect.creativelabs.com/developer/Gaming/Forms/AllItems.aspx\n" 130 "@see SFXAmbience::environment\n\n" 131 "@ref SFX_reverb\n" 132 "@ingroup SFX\n" 133); 134 135 136//----------------------------------------------------------------------------- 137 138SFXEnvironment::SFXEnvironment() 139{ 140} 141 142//----------------------------------------------------------------------------- 143 144void SFXEnvironment::initPersistFields() 145{ 146 addGroup( "Reverb" ); 147 148 addField("reverbDensity", TypeF32, Offset(mReverb.flDensity, SFXEnvironment), 149 "Density of reverb environment."); 150 addField("reverbDiffusion", TypeF32, Offset(mReverb.flDiffusion, SFXEnvironment), 151 "Environment diffusion."); 152 addField("reverbGain", TypeF32, Offset(mReverb.flGain, SFXEnvironment), 153 "Reverb Gain Level."); 154 addField("reverbGainHF", TypeF32, Offset(mReverb.flGainHF, SFXEnvironment), 155 "Reverb Gain to high frequencies"); 156 addField("reverbGainLF", TypeF32, Offset(mReverb.flGainLF, SFXEnvironment), 157 "Reverb Gain to high frequencies"); 158 addField("reverbDecayTime", TypeF32, Offset(mReverb.flDecayTime, SFXEnvironment), 159 "Decay time for the reverb."); 160 addField("reverbDecayHFRatio", TypeF32, Offset(mReverb.flDecayHFRatio, SFXEnvironment), 161 "High frequency decay time ratio."); 162 addField("reverbDecayLFRatio", TypeF32, Offset(mReverb.flDecayLFRatio, SFXEnvironment), 163 "High frequency decay time ratio."); 164 addField("reflectionsGain", TypeF32, Offset(mReverb.flReflectionsGain, SFXEnvironment), 165 "Reflection Gain."); 166 addField("reflectionDelay", TypeF32, Offset(mReverb.flReflectionsDelay, SFXEnvironment), 167 "How long to delay reflections."); 168 addField("reflectionsPan", TypeF32, Offset(mReverb.flReflectionsPan, SFXEnvironment), 3, 169 "Reflection reverberation panning vector."); 170 addField("lateReverbGain", TypeF32, Offset(mReverb.flLateReverbGain, SFXEnvironment), 171 "Late reverb gain amount."); 172 addField("lateReverbDelay", TypeF32, Offset(mReverb.flLateReverbDelay, SFXEnvironment), 173 "Late reverb delay time."); 174 addField("lateReverbPan", TypeF32, Offset(mReverb.flLateReverbPan, SFXEnvironment), 3, 175 "Late reverberation panning vector."); 176 addField("reverbEchoTime", TypeF32, Offset(mReverb.flEchoTime, SFXEnvironment), 177 "Reverb echo time."); 178 addField("reverbEchoDepth", TypeF32, Offset(mReverb.flEchoDepth, SFXEnvironment), 179 "Reverb echo depth."); 180 addField("reverbModTime", TypeF32, Offset(mReverb.flModulationTime, SFXEnvironment), 181 "Reverb Modulation time."); 182 addField("reverbModDepth", TypeF32, Offset(mReverb.flModulationDepth, SFXEnvironment), 183 "Reverb Modulation time."); 184 addField("airAbsorbtionGainHF", TypeF32, Offset(mReverb.flAirAbsorptionGainHF, SFXEnvironment), 185 "High Frequency air absorbtion"); 186 addField("reverbHFRef", TypeF32, Offset(mReverb.flHFReference, SFXEnvironment), 187 "Reverb High Frequency Reference."); 188 addField("reverbLFRef", TypeF32, Offset(mReverb.flLFReference, SFXEnvironment), 189 "Reverb Low Frequency Reference."); 190 addField("roomRolloffFactor", TypeF32, Offset(mReverb.flRoomRolloffFactor, SFXEnvironment), 191 "Rolloff factor for reverb."); 192 addField("decayHFLimit", TypeS32, Offset(mReverb.iDecayHFLimit, SFXEnvironment), 193 "High Frequency decay limit."); 194 endGroup("Reverb"); 195 196 Parent::initPersistFields(); 197} 198 199//----------------------------------------------------------------------------- 200 201bool SFXEnvironment::onAdd() 202{ 203 if( !Parent::onAdd() ) 204 return false; 205 206 Sim::getSFXEnvironmentSet()->addObject( this ); 207 208 return true; 209} 210 211//----------------------------------------------------------------------------- 212 213bool SFXEnvironment::preload( bool server, String& errorStr ) 214{ 215 if( !Parent::preload( server, errorStr ) ) 216 return false; 217 218 validate(); 219 220 return true; 221} 222 223//----------------------------------------------------------------------------- 224 225void SFXEnvironment::inspectPostApply() 226{ 227 Parent::inspectPostApply(); 228 validate(); 229} 230 231//----------------------------------------------------------------------------- 232 233void SFXEnvironment::validate() 234{ 235 mReverb.validate(); 236} 237 238//----------------------------------------------------------------------------- 239 240void SFXEnvironment::packData( BitStream* stream ) 241{ 242 Parent::packData( stream ); 243 244 stream->write(mReverb.flDensity); 245 stream->write(mReverb.flDiffusion); 246 stream->write(mReverb.flGain); 247 stream->write(mReverb.flGainHF); 248 stream->write(mReverb.flGainLF); 249 stream->write(mReverb.flDecayTime); 250 stream->write(mReverb.flDecayHFRatio); 251 stream->write(mReverb.flDecayLFRatio); 252 stream->write(mReverb.flReflectionsGain); 253 stream->write(mReverb.flReflectionsDelay); 254 stream->write(mReverb.flLateReverbGain); 255 stream->write(mReverb.flLateReverbDelay); 256 stream->write(mReverb.flEchoTime); 257 stream->write(mReverb.flEchoDepth); 258 stream->write(mReverb.flModulationTime); 259 stream->write(mReverb.flModulationDepth); 260 stream->write(mReverb.flAirAbsorptionGainHF); 261 stream->write(mReverb.flHFReference); 262 stream->write(mReverb.flLFReference); 263 stream->write(mReverb.flRoomRolloffFactor); 264 stream->write(mReverb.iDecayHFLimit); 265} 266 267//----------------------------------------------------------------------------- 268 269void SFXEnvironment::unpackData( BitStream* stream ) 270{ 271 Parent::unpackData( stream ); 272 273 stream->read(&mReverb.flDensity); 274 stream->read(&mReverb.flDiffusion); 275 stream->read(&mReverb.flGain); 276 stream->read(&mReverb.flGainHF); 277 stream->read(&mReverb.flGainLF); 278 stream->read(&mReverb.flDecayTime); 279 stream->read(&mReverb.flDecayHFRatio); 280 stream->read(&mReverb.flDecayLFRatio); 281 stream->read(&mReverb.flReflectionsGain); 282 stream->read(&mReverb.flReflectionsDelay); 283 stream->read(&mReverb.flLateReverbGain); 284 stream->read(&mReverb.flLateReverbDelay); 285 stream->read(&mReverb.flEchoTime); 286 stream->read(&mReverb.flEchoDepth); 287 stream->read(&mReverb.flModulationTime); 288 stream->read(&mReverb.flModulationDepth); 289 stream->read(&mReverb.flAirAbsorptionGainHF); 290 stream->read(&mReverb.flHFReference); 291 stream->read(&mReverb.flLFReference); 292 stream->read(&mReverb.flRoomRolloffFactor); 293 stream->read(&mReverb.iDecayHFLimit); 294} 295