diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-06 18:01:52 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-06 18:01:52 +0300 |
commit | daa3b2047757f1b4218a75aeaa66fb5d22f41689 (patch) | |
tree | cc2a3abdc751bd45c27cf327b8c77bf84dfaa53f /src | |
parent | 13522259b8d355b6e8dd11dd66f40d24386ce4d7 (diff) |
Fix cAudioManager::ProcessActiveQueues loop
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/AudioManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 0f4281dc..ec520eaa 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -609,10 +609,9 @@ cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float d float newSoundIntensity; if (soundIntensity <= 0.0f) return 0; - if ((soundIntensity * 0.2f) <= distance) { - newSoundIntensity = soundIntensity * 0.2f; + newSoundIntensity = soundIntensity / 5.0f; + if (newSoundIntensity <= distance) emittingVolume = sq((soundIntensity - newSoundIntensity - (distance - newSoundIntensity)) / (soundIntensity - newSoundIntensity)) * emittingVolume; - } return emittingVolume; } @@ -3611,11 +3610,10 @@ cAudioManager::ProcessActiveQueues() SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity); } SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag); - continue; + break; } sample.m_bIsProcessed = false; m_asActiveSamples[j].m_bIsProcessed = false; - break; } } } |