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

Method deleteDevice

Engine/source/sfx/sfxSystem.cpp:500–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498//-----------------------------------------------------------------------------
499
500void SFXSystem::deleteDevice()
501{
502 // Make sure we have a valid device.
503 if ( !mDevice )
504 return;
505
506 // Put all playing sounds into virtualized playback mode. Where this fails,
507 // stop the source.
508
509 for( U32 i = 0; i < mSounds.size(); ++ i )
510 {
511 SFXSound* sound = mSounds[ i ];
512 if( sound->hasVoice() && !sound->_releaseVoice() )
513 sound->stop();
514 }
515
516 // Signal everyone who cares that the
517 // device is being deleted.
518 getEventSignal().trigger( SFXSystemEvent_DestroyDevice );
519
520 // Free the device which should delete all
521 // the active voices and buffers.
522 delete mDevice;
523 mDevice = NULL;
524}
525
526//-----------------------------------------------------------------------------
527

Callers 1

sfxSystem.cppFile · 0.80

Calls 5

hasVoiceMethod · 0.80
_releaseVoiceMethod · 0.80
sizeMethod · 0.45
stopMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected