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

Method stopAndDeleteSource

Engine/source/sfx/sfxSystem.cpp:621–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619//-----------------------------------------------------------------------------
620
621void SFXSystem::stopAndDeleteSource( SFXSource* source )
622{
623 if( source->getFadeOutTime() > 0.f )
624 {
625 // Fade-out. Stop and put on play-once list to
626 // ensure deletion when the source actually stops.
627
628 source->stop();
629 deleteWhenStopped( source );
630 }
631 else
632 {
633 // No fade-out. Just stop and delete the source.
634
635 source->stop();
636 SFX_DELETE( source );
637 }
638}
639
640//-----------------------------------------------------------------------------
641

Callers 1

sfxSystem.cppFile · 0.80

Calls 2

getFadeOutTimeMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected