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

Method _assignVoice

Engine/source/sfx/sfxSystem.cpp:992–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990//-----------------------------------------------------------------------------
991
992void SFXSystem::_assignVoice( SFXSound* sound )
993{
994 if( !mDevice )
995 return;
996
997 // Make sure all properties are up-to-date.
998
999 sound->_update();
1000
1001 // If voices are managed by the device, just let the sound
1002 // allocate a voice on it. Otherwise, do a voice allocation pass
1003 // on all our active sounds.
1004
1005 if( mDevice->getCaps() & SFXDevice::CAPS_VoiceManagement )
1006 sound->_allocVoice( mDevice );
1007 else
1008 _assignVoices();
1009
1010 // Update the voice count stat.
1011 mStatNumVoices = mDevice->getVoiceCount();
1012}
1013
1014//-----------------------------------------------------------------------------
1015

Callers 2

_reloadBufferMethod · 0.80
_playMethod · 0.80

Calls 4

getCapsMethod · 0.80
_allocVoiceMethod · 0.80
getVoiceCountMethod · 0.80
_updateMethod · 0.45

Tested by

no test coverage detected