| 993 | //----------------------------------------------------------------------------- |
| 994 | |
| 995 | void 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 |
no test coverage detected