diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 12:47:10 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 23:39:47 +0200 |
commit | 14c71f39ff97684e6c6933cf18781e8d162d1be6 (patch) | |
tree | 15c68cd95c46d09c879e9753d397f12c28281d51 /src/audio/AudioManager.cpp | |
parent | Don't restart OAL device when switching EAX (diff) | |
download | re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.gz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.bz2 re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.lz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.xz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.zst re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.zip |
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r-- | src/audio/AudioManager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index e2596964..aa6a0653 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -440,6 +440,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++) @@ -793,9 +796,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) @@ -807,6 +810,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) |