TWP: Use explicit cast in AudioSystem. PVS-Studio V636

This commit is contained in:
scemino 2024-03-17 20:23:31 +01:00
parent a7be536609
commit f3e512c34f

View File

@ -147,7 +147,7 @@ float AudioSystem::getMasterVolume() const {
void AudioSystem::updateVolume(AudioSlot *slot) {
float vol = _masterVolume * slot->volume;
if (slot->fadeInTimeMs) {
vol *= (g_twp->_mixer->getElapsedTime(slot->handle).msecs() / slot->total);
vol *= (((float)g_twp->_mixer->getElapsedTime(slot->handle).msecs()) / slot->total);
}
if (slot->fadeOutTimeMs) {
float startFade = slot->total - slot->fadeOutTimeMs;