MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / SFXSystem

Method SFXSystem

Engine/source/sfx/sfxSystem.cpp:189–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187//-----------------------------------------------------------------------------
188
189SFXSystem::SFXSystem()
190 : mDevice( NULL ),
191 mLastSourceUpdateTime( 0 ),
192 mLastAmbientUpdateTime( 0 ),
193 mLastParameterUpdateTime( 0 ),
194 mStatNumSources( 0 ),
195 mStatNumSounds( 0 ),
196 mStatNumPlaying( 0 ),
197 mStatNumCulled( 0 ),
198 mStatNumVoices( 0 ),
199 mStatSourceUpdateTime( 0 ),
200 mStatParameterUpdateTime( 0 ),
201 mStatAmbientUpdateTime( 0 ),
202 mDistanceModel( SFXDistanceModelLinear ),
203 mDopplerFactor( 0.5 ),
204 mRolloffFactor( 1.0 ),
205 mSoundscapeMgr( NULL )
206{
207 VECTOR_SET_ASSOCIATION( mSounds );
208 VECTOR_SET_ASSOCIATION( mPlayOnceSources );
209 VECTOR_SET_ASSOCIATION( mPlugins );
210 VECTOR_SET_ASSOCIATION( mListeners );
211
212 // Always at least one listener.
213
214 mListeners.increment();
215
216 // Register stat variables.
217
218 Con::addVariable( "SFX::numSources", TypeS32, &mStatNumSources,
219 "Number of SFXSource type objects that are currently instantiated.\n"
220 "@ingroup SFX" );
221 Con::addVariable( "SFX::numSounds", TypeS32, &mStatNumSounds,
222 "Number of SFXSound type objects (i.e. actual single-file sounds) that are currently instantiated.\n"
223 "@ingroup SFX" );
224 Con::addVariable( "SFX::numPlaying", TypeS32, &mStatNumPlaying,
225 "Number of SFXSources that are currently in playing state.\n"
226 "@ingroup SFX" );
227 Con::addVariable( "SFX::numCulled", TypeS32, &mStatNumCulled,
228 "Number of SFXSounds that are currently in virtualized playback mode.\n"
229 "@ref SFXSound_virtualization\n\n"
230 "@ingroup SFX" );
231 Con::addVariable( "SFX::numVoices", TypeS32, &mStatNumVoices,
232 "Number of voices that are currently allocated on the sound device.\n"
233 "@ingroup SFX" );
234 Con::addVariable( "SFX::sourceUpdateTime", TypeS32, &mStatSourceUpdateTime,
235 "Milliseconds spent on the last SFXSource update loop.\n"
236 "@ref SFX_updating\n\n"
237 "@ingroup SFX" );
238 Con::addVariable( "SFX::parameterUpdateTime", TypeS32, &mStatParameterUpdateTime,
239 "Milliseconds spent on the last SFXParameter update loop.\n"
240 "@ref SFX_updating\n\n"
241 "@ref SFX_interactive\n\n"
242 "@ingroup SFX" );
243 Con::addVariable( "SFX::ambientUpdateTime", TypeS32, &mStatAmbientUpdateTime,
244 "Milliseconds spent on the last ambient audio update.\n"
245 "@ref SFX_updating\n\n"
246 "@ref SFX_ambient\n\n"

Callers

nothing calls this directly

Calls 3

addVariableFunction · 0.85
addConstantFunction · 0.85
incrementMethod · 0.80

Tested by

no test coverage detected