summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-30 10:27:18 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-30 10:27:18 +0200
commit6df0cb1ddbcc15017a699400007bb2da62a18c58 (patch)
tree07137642260a312ea09730744a986d5d163e8395 /src/audio
parentFix yet another DirectlyEnqueueSample (diff)
parentAudio: ps2 code ifdef (diff)
downloadre3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar.gz
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar.bz2
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar.lz
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar.xz
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.tar.zst
re3-6df0cb1ddbcc15017a699400007bb2da62a18c58.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioManager.cpp14
-rw-r--r--src/audio/AudioManager.h4
2 files changed, 11 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index c3466b59..fc7d1bac 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -1390,18 +1390,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
void
cAudioManager::DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo)
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index c5436cc0..fcf80c5a 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -359,7 +359,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
void DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo = 0);
#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well