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

Method _reloadBuffer

Engine/source/sfx/sfxSound.cpp:169–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167//-----------------------------------------------------------------------------
168
169void SFXSound::_reloadBuffer()
170{
171 SFXProfile* profile = getProfile();
172 if( profile != NULL && _releaseVoice() )
173 {
174 SFXBuffer* buffer = profile->getBuffer();
175 if( !buffer )
176 {
177 Con::errorf( "SFXSound::_reloadBuffer() - Could not create device buffer!" );
178 return;
179 }
180
181 _setBuffer( buffer );
182
183 if( getLastStatus() == SFXStatusPlaying )
184 SFX->_assignVoice( this );
185 }
186}
187
188//-----------------------------------------------------------------------------
189

Callers

nothing calls this directly

Calls 3

_assignVoiceMethod · 0.80
errorfFunction · 0.50
getBufferMethod · 0.45

Tested by

no test coverage detected