| 990 | //----------------------------------------------------------------------------- |
| 991 | |
| 992 | void 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 |
no test coverage detected