Merge pull request #161 from ShFil119/audio5

Audio fixes
This commit is contained in:
aap 2019-07-22 23:04:26 +02:00 committed by GitHub
commit 07c6c7d0a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,9 +172,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
reflectionDistance = m_afReflectionsDistances[i]; reflectionDistance = m_afReflectionsDistances[i];
if(reflectionDistance > 0.0f && reflectionDistance < 100.f && if(reflectionDistance > 0.0f && reflectionDistance < 100.f &&
reflectionDistance < m_sQueueSample.m_fSoundIntensity) { reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
m_sQueueSample.m_bLoopsRemaining = m_sQueueSample.m_bLoopsRemaining = (reflectionDistance * 500.f / 1029.f);
(reflectionDistance *
0.38873f); // @todo assert value, here used from VC
if(m_sQueueSample.m_bLoopsRemaining > 5u) { if(m_sQueueSample.m_bLoopsRemaining > 5u) {
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i]; m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
m_sQueueSample.m_bEmittingVolume = emittingVolume; m_sQueueSample.m_bEmittingVolume = emittingVolume;
@ -287,8 +285,8 @@ cAudioManager::AddSampleToRequestedQueue()
calculatedVolume = m_sQueueSample.field_16 * (maxVolume - m_sQueueSample.m_bVolume); calculatedVolume = m_sQueueSample.field_16 * (maxVolume - m_sQueueSample.m_bVolume);
sampleIndex = m_bSampleRequestQueuesStatus[m_bActiveSampleQueue]; sampleIndex = m_bSampleRequestQueuesStatus[m_bActiveSampleQueue];
if(sampleIndex >= m_bActiveSamples) { if(sampleIndex >= m_bActiveSamples) {
sampleIndex = *(&m_asSamples[1][26].field_91 + m_bActiveSamples + sampleIndex =
27 * m_bActiveSampleQueue); m_abSampleQueueIndexTable[m_bActiveSampleQueue][m_bActiveSamples - 1];
if(m_asSamples[m_bActiveSampleQueue][sampleIndex].calculatedVolume <= if(m_asSamples[m_bActiveSampleQueue][sampleIndex].calculatedVolume <=
calculatedVolume) calculatedVolume)
return; return;