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

Method _updateVolume

Engine/source/sfx/sfxSound.cpp:481–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479//-----------------------------------------------------------------------------
480
481void SFXSound::_updateVolume( const MatrixF& listener )
482{
483 F32 oldPreAttenuatedVolume = mPreAttenuatedVolume;
484 Parent::_updateVolume( listener );
485
486 // If we have a voice and the pre-attenuated volume has
487 // changed, pass it on to the voice. Attenuation itself will
488 // happen on the device.
489
490 if( mVoice != NULL && oldPreAttenuatedVolume != mPreAttenuatedVolume )
491 mVoice->setVolume( mPreAttenuatedVolume );
492}
493
494//-----------------------------------------------------------------------------
495

Callers

nothing calls this directly

Calls 1

setVolumeMethod · 0.45

Tested by

no test coverage detected