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

Method _updatePitch

Engine/source/sfx/sfxController.cpp:772–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770//-----------------------------------------------------------------------------
771
772void SFXController::_updatePitch()
773{
774 F32 oldEffectivePitch = mEffectivePitch;
775 Parent::_updatePitch();
776
777 if( mEffectivePitch != oldEffectivePitch )
778 for( U32 i = 0; i < mSources.size(); ++ i )
779 {
780 Source& source = mSources[ i ];
781 if( source.mPtr != NULL )
782 source.mPtr->setModulativePitch( mEffectivePitch * source.mPitchScale );
783 else
784 {
785 mSources.erase( i );
786 -- i;
787 }
788 }
789}
790
791//-----------------------------------------------------------------------------
792

Callers

nothing calls this directly

Calls 3

setModulativePitchMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected