diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-29 10:57:51 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:32:44 +0200 |
commit | f741101e4458d2515c57ae11f3f6c0088206524f (patch) | |
tree | 4e7d72af74ebd8194020ac70ee8e82509e8709db /src/audio | |
parent | Fix cut off sfx on high framerates (diff) | |
download | re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar.gz re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar.bz2 re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar.lz re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar.xz re3-f741101e4458d2515c57ae11f3f6c0088206524f.tar.zst re3-f741101e4458d2515c57ae11f3f6c0088206524f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/AudioManager.cpp | 15 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 4 | ||||
-rw-r--r-- | src/audio/MusicManager.cpp | 4 |
3 files changed, 6 insertions, 17 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 69126c23..c49ce552 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -41,11 +41,6 @@ cAudioManager::cAudioManager() m_bFifthFrameFlag = FALSE; m_bTimerJustReset = FALSE; m_nTimer = 0; - -#ifdef FIX_BUGS - m_LogicalFrameCounter = 0; - m_bLogicalFrameUpdate = FALSE; -#endif } cAudioManager::~cAudioManager() @@ -105,12 +100,6 @@ cAudioManager::Terminate() void cAudioManager::Service() { -#ifdef FIX_BUGS - m_bLogicalFrameUpdate = m_LogicalFrameCounter != CTimer::GetLogicalFrameCounter(); - if(m_bLogicalFrameUpdate) - m_LogicalFrameCounter = CTimer::GetLogicalFrameCounter(); -#endif - GenerateIntegerRandomNumberTable(); if (m_bTimerJustReset) { ResetAudioLogicTimers(m_nTimer); @@ -435,7 +424,7 @@ void cAudioManager::ServiceSoundEffects() { #ifdef FIX_BUGS - if(m_bLogicalFrameUpdate) + if(CTimer::GetLogicalFramesPassed() != 0) #endif m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0; if (m_nUserPause && !m_nPreviousUserPause) { @@ -741,7 +730,7 @@ cAudioManager::AddReleasingSounds() sample.m_nVolume -= sample.m_nVolumeChange; } #ifdef FIX_BUGS - if(m_bLogicalFrameUpdate) + if(CTimer::GetLogicalFramesPassed() != 0) #endif --sample.m_nReleasingVolumeDivider; if (m_bFifthFrameFlag) { diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index dcd6c7c4..70302745 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -223,10 +223,6 @@ public: uint8 m_nUserPause; uint8 m_nPreviousUserPause; uint32 m_FrameCounter; -#ifdef FIX_BUGS - uint32 m_LogicalFrameCounter; - bool8 m_bLogicalFrameUpdate; -#endif cAudioManager(); ~cAudioManager(); diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index 4eaa37d5..957fce55 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -195,7 +195,11 @@ cMusicManager::DisplayRadioStationName() cDisplay = 60; } else { if(cDisplay == 0) return; +#ifdef FIX_BUGS + cDisplay -= CTimer::GetLogicalFramesPassed(); +#else cDisplay--; +#endif } CFont::SetJustifyOff(); |