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

Method _assignVoice

Engine/source/sfx/sfxSystem.cpp:995–1015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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