MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _setBuffer

Method _setBuffer

Engine/source/sfx/sfxSound.cpp:190–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188//-----------------------------------------------------------------------------
189
190void SFXSound::_setBuffer( SFXBuffer* buffer )
191{
192 mBuffer = buffer;
193
194 // There is no telling when the device will be
195 // destroyed and the buffers deleted.
196 //
197 // By caching the duration now we can allow sources
198 // to continue virtual playback until the device
199 // is restored.
200 mDuration = mBuffer->getDuration();
201}
202
203//-----------------------------------------------------------------------------
204

Callers 1

_createMethod · 0.80

Calls 1

getDurationMethod · 0.45

Tested by

no test coverage detected