Merge remote-tracking branch 'GitHub/miami' into lcs

This commit is contained in:
Sergeanur
2021-06-25 00:47:06 +03:00
10 changed files with 131 additions and 61 deletions
+8 -2
View File
@@ -442,6 +442,9 @@ cAudioManager::IsAudioInitialised() const
void
cAudioManager::ServiceSoundEffects()
{
#ifdef FIX_BUGS
if(CTimer::GetLogicalFramesPassed() != 0)
#endif
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
for (int32 i = 0; i < NUM_CHANNELS; i++)
@@ -795,9 +798,9 @@ cAudioManager::AddReleasingSounds()
}
if (!toProcess[i]) {
if (sample.m_nCounter <= 255 || !sample.m_nLoopsRemaining) {
if (!sample.m_nReleasingVolumeDivider)
if (sample.m_nReleasingVolumeDivider == 0)
continue;
if (!sample.m_nLoopCount) {
if (sample.m_nLoopCount == 0) {
if (sample.m_nVolumeChange == -1) {
sample.m_nVolumeChange = sample.m_nVolume / sample.m_nReleasingVolumeDivider;
if (sample.m_nVolumeChange <= 0)
@@ -809,6 +812,9 @@ cAudioManager::AddReleasingSounds()
}
sample.m_nVolume -= sample.m_nVolumeChange;
}
#ifdef FIX_BUGS
if(CTimer::GetLogicalFramesPassed() != 0)
#endif
--sample.m_nReleasingVolumeDivider;
if (m_bFifthFrameFlag) {
if (sample.m_nReleasingVolumeModificator < 20)