summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-30 10:25:14 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-30 10:25:14 +0200
commitbcdeb710703c5022b8674a6791a945be251f73a2 (patch)
tree026273c411ab70e1cb8288c70cd3518d643f252b
parentps2 fix (diff)
downloadre3-bcdeb710703c5022b8674a6791a945be251f73a2.tar
re3-bcdeb710703c5022b8674a6791a945be251f73a2.tar.gz
re3-bcdeb710703c5022b8674a6791a945be251f73a2.tar.bz2
re3-bcdeb710703c5022b8674a6791a945be251f73a2.tar.lz
re3-bcdeb710703c5022b8674a6791a945be251f73a2.tar.xz
re3-bcdeb710703c5022b8674a6791a945be251f73a2.tar.zst
re3-bcdeb710703c5022b8674a6791a945be251f73a2.zip
-rw-r--r--src/audio/AudioManager.cpp14
-rw-r--r--src/audio/AudioManager.h2
2 files changed, 10 insertions, 6 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index ec96f84d..dc8090ab 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -1200,18 +1200,20 @@ cAudioManager::ClearActiveSamples()
}
void
-cAudioManager::LoadBankIfNecessary(uint8 bank)
+cAudioManager::GenerateIntegerRandomNumberTable()
{
- if(!SampleManager.IsSampleBankLoaded(bank))
- SampleManager.LoadSampleBank(bank);
+ for (uint32 i = 0; i < ARRAY_SIZE(m_anRandomTable); i++)
+ m_anRandomTable[i] = myrand();
}
+#ifdef GTA_PS2
void
-cAudioManager::GenerateIntegerRandomNumberTable()
+cAudioManager::LoadBankIfNecessary(uint8 bank)
{
- for (uint32 i = 0; i < ARRAY_SIZE(m_anRandomTable); i++)
- m_anRandomTable[i] = myrand();
+ if(!SampleManager.IsSampleBankLoaded(bank))
+ SampleManager.LoadSampleBank(bank);
}
+#endif
#ifdef EXTERNAL_3D_SOUND
void
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 7b3526e7..24eaab2a 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -318,7 +318,9 @@ public:
void ClearRequestedQueue(); // inlined on PS2
void ClearActiveSamples();
void GenerateIntegerRandomNumberTable(); // inlined on PS2
+#ifdef GTA_PS2
void LoadBankIfNecessary(uint8 bank); // this is used only on PS2 but technically not a platform code
+#endif
#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well
void AdjustSamplesVolume();