Audio: fixing bugs, fixing types, making code more accurate to original

This commit is contained in:
Sergeanur
2021-08-29 09:42:32 +03:00
parent 8ef1e29a5c
commit 9a7b469f4e
12 changed files with 3634 additions and 3513 deletions

View File

@@ -781,7 +781,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
} else
#endif
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
m_sQueueSample.m_MaxDistance /= 2.f;
m_sQueueSample.m_MaxDistance /= 2.0f;
uint32 halfOldFreq = oldFreq >> 1;
@@ -993,9 +993,9 @@ cAudioManager::AddReleasingSounds()
if (sample.m_nSampleIndex >= SAMPLEBANK_PED_START && sample.m_nSampleIndex <= SAMPLEBANK_PED_END) { // check if it's ped comment
uint8 vol;
if (CWorld::GetIsLineOfSightClear(TheCamera.GetPosition(), sample.m_vecPos, true, false, false, false, false, false))
vol = MAX_VOLUME;
vol = PED_COMMENT_VOLUME;
else
vol = 31;
vol = PED_COMMENT_VOLUME_BEHIND_WALL;
#ifdef EXTERNAL_3D_SOUND
sample.m_nEmittingVolume = vol;
#endif
@@ -1011,7 +1011,7 @@ cAudioManager::AddReleasingSounds()
if (sample.m_nEmittingVolumeChange > 0)
sample.m_nEmittingVolumeChange = volumeDiff * sample.m_nEmittingVolumeChange;
#endif
sample.m_nVolume = Min(127, newVolume);
sample.m_nVolume = Min(MAX_VOLUME, newVolume);
}
}
if (sample.m_nVolume == 0)