Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix overflow in audio code
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+1
−1
src/audio/AudioManager.cpp
There are no files selected for viewing
|
|
@@ -977,7 +977,7 @@ void |
|
|
cAudioManager::AdjustSamplesVolume() |
|
|
{ |
|
|
for (int i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) { |
|
|
tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] + 1]; |
|
|
tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]]; |
|
|
|
|
|
if (!pSample->m_bIs2D) |
|
|
pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_fSoundIntensity, pSample->m_fDistance); |
|
|
|