summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/audio/AudioManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 12738c75..5d832698 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -723,6 +723,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
{
float reflectionDistance;
int32 noise;
+ uint32 oldCounter = m_sQueueSample.m_nCounter;
uint8 emittingVolume = (m_sQueueSample.m_nVolume >> 1) + (m_sQueueSample.m_nVolume >> 3);
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
@@ -734,7 +735,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
SET_EMITTING_VOLUME(emittingVolume);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > emittingVolume >> 4) {
- m_sQueueSample.m_nCounter += (i + 1) << 8;
+ m_sQueueSample.m_nCounter = oldCounter + ((i + 1) << 8);
if (m_sQueueSample.m_nLoopCount > 0) {
noise = RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
if (noise > 0)