From 320624edc87778960906d28252752f2471f8a571 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 30 Aug 2021 11:25:14 +0300 Subject: [PATCH] Audio: ps2 code ifdef # Conflicts: # src/audio/AudioManager.h --- src/audio/AudioManager.cpp | 14 ++++++++------ src/audio/AudioManager.h | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 8921ff7b..a0afe94d 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -1394,18 +1394,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 b537c37e..1312826b 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -349,7 +349,9 @@ public: void ClearRequestedQueue(); // inlined in vc void ClearActiveSamples(); void GenerateIntegerRandomNumberTable(); - void LoadBankIfNecessary(uint8 bank); +#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(); // inlined