summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-06 17:03:36 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-06 17:03:36 +0200
commitd015e09c929df28d09e95ba9f8799a97292b734f (patch)
tree5e83f4c063f702ea5c326fb05073a48261d7a1ec /src/audio
parentgot rid of superfluous enum (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadre3-d015e09c929df28d09e95ba9f8799a97292b734f.tar
re3-d015e09c929df28d09e95ba9f8799a97292b734f.tar.gz
re3-d015e09c929df28d09e95ba9f8799a97292b734f.tar.bz2
re3-d015e09c929df28d09e95ba9f8799a97292b734f.tar.lz
re3-d015e09c929df28d09e95ba9f8799a97292b734f.tar.xz
re3-d015e09c929df28d09e95ba9f8799a97292b734f.tar.zst
re3-d015e09c929df28d09e95ba9f8799a97292b734f.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioManager.cpp8
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;
}
}
}