mark some audio stuff and fix frameCounter

This commit is contained in:
Roman Masanin
2020-10-12 18:09:58 +03:00
parent 96f36d16ae
commit e34261d3ef
3 changed files with 35 additions and 51 deletions

View File

@@ -432,7 +432,7 @@ cAudioManager::IsAudioInitialised() const
void
cAudioManager::ServiceSoundEffects()
{
field_5554++;
m_FrameCounter++;
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
for (int32 i = 0; i < allChannels; i++)
@@ -771,7 +771,7 @@ cAudioManager::ProcessActiveQueues()
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
if (sample.m_nLoopCount) {
if (field_5554 & 1) {
if (m_FrameCounter & 1) {
if (!(j & 1)) {
flag = false;
} else {