summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-08-02 23:09:37 +0200
committerGitHub <noreply@github.com>2019-08-02 23:09:37 +0200
commita890a8a3b45c74c1e29bb4c9aba650752c39c5d9 (patch)
treed41bb0d3b3f434ff8d4d3e4f12746451ae03083b /src/audio/AudioManager.cpp
parentsome CPed cleanup (diff)
parentMerge branch 'master' of github.com:Fire-Head/re3 (diff)
downloadre3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar.gz
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar.bz2
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar.lz
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar.xz
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.tar.zst
re3-a890a8a3b45c74c1e29bb4c9aba650752c39c5d9.zip
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp308
1 files changed, 154 insertions, 154 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index bffdc27f..bd99628e 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -14,7 +14,7 @@
#include "Plane.h"
#include "PlayerPed.h"
#include "Pools.h"
-#include "SampleManager.h"
+#include "sampman.h"
#include "Stats.h"
#include "Vehicle.h"
#include "Plane.h"
@@ -149,9 +149,9 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
}
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
@@ -351,9 +351,9 @@ cAudioManager::AgeCrimes()
}
int8
-cAudioManager::AutoDetect3DProviders()
+cAudioManager::GetCurrent3DProviderIndex()
{
- if(m_bIsInitialised) return cSampleManager.AutoDetect3DProviders();
+ if(m_bIsInitialised) return SampleManager.GetCurrent3DProviderIndex();
return -1;
}
@@ -370,7 +370,7 @@ cAudioManager::CalculateDistance(bool *ptr, float dist)
bool
cAudioManager::CheckForAnAudioFileOnCD()
{
- return cSampleManager.CheckForAnAudioFileOnCD();
+ return SampleManager.CheckForAnAudioFileOnCD();
}
void
@@ -522,12 +522,12 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_bIsDistant = 1;
m_sQueueSample.field_16 = 10;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_SCANNER_CRACKLE);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_SCANNER_CRACKLE);
m_sQueueSample.m_bVolume = m_anRandomTable[2] % 20u + 15;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
- m_sQueueSample.m_nLoopStart = cSampleManager.GetSampleLoopStartOffset(188);
- m_sQueueSample.m_nLoopEnd = cSampleManager.GetSampleLoopEndOffset(188);
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(188);
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(188);
m_sQueueSample.field_56 = 0;
m_sQueueSample.m_bReverbFlag = 0;
m_sQueueSample.m_bOffset = 63;
@@ -569,9 +569,9 @@ cAudioManager::Initialise()
{
if(!m_bIsInitialised) {
PreInitialiseGameSpecificSetup();
- m_bIsInitialised = cSampleManager.Initialise();
+ m_bIsInitialised = SampleManager.Initialise();
if(m_bIsInitialised) {
- m_bActiveSamples = cSampleManager.GetActiveSamples();
+ m_bActiveSamples = SampleManager.GetMaximumSupportedChannels();
if(m_bActiveSamples <= 1u) {
Terminate();
} else {
@@ -651,10 +651,10 @@ cAudioManager::Terminate()
PreTerminateGameSpecificShutdown();
for(uint32 i = 0; i < 2; i++) {
- if(cSampleManager.IsSampleBankLoaded(i)) cSampleManager.UnloadSampleBank(i);
+ if(SampleManager.IsSampleBankLoaded(i)) SampleManager.UnloadSampleBank(i);
}
- cSampleManager.Terminate();
+ SampleManager.Terminate();
m_bIsInitialised = 0;
PostTerminateGameSpecificShutdown();
@@ -678,14 +678,14 @@ cAudioManager::GetMissionAudioLoadingStatus()
uint8
cAudioManager::GetNum3DProvidersAvailable()
{
- if(m_bIsInitialised) return num3DProvidersAvailable;
+ if(m_bIsInitialised) return SampleManager.GetNum3DProvidersAvailable();
return 0;
}
bool
cAudioManager::IsMP3RadioChannelAvailable()
{
- if(m_bIsInitialised) return cSampleManager.IsMP3RadioChannelAvailable();
+ if(m_bIsInitialised) return SampleManager.IsMP3RadioChannelAvailable();
return 0;
}
@@ -693,7 +693,7 @@ cAudioManager::IsMP3RadioChannelAvailable()
uint8
cAudioManager::GetCDAudioDriveLetter()
{
- if(m_bIsInitialised) return cSampleManager.GetCDAudioDriveLetter();
+ if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
return 0;
}
@@ -701,31 +701,31 @@ cAudioManager::GetCDAudioDriveLetter()
void
cAudioManager::SetEffectsMasterVolume(uint8 volume)
{
- cSampleManager.SetEffectsMasterVolume(volume);
+ SampleManager.SetEffectsMasterVolume(volume);
}
void
cAudioManager::SetMusicMasterVolume(uint8 volume)
{
- cSampleManager.SetMusicMasterVolume(volume);
+ SampleManager.SetMusicMasterVolume(volume);
}
void
-cAudioManager::SetEffectsFadeVol(uint8 volume)
+cAudioManager::SetEffectsFadeVolume(uint8 volume)
{
- cSampleManager.SetEffectsFadeVol(volume);
+ SampleManager.SetEffectsFadeVolume(volume);
}
void
-cAudioManager::SetMusicFadeVol(uint8 volume)
+cAudioManager::SetMusicFadeVolume(uint8 volume)
{
- cSampleManager.SetMusicFadeVol(volume);
+ SampleManager.SetMusicFadeVolume(volume);
}
void
cAudioManager::SetSpeakerConfig(int32 conf)
{
- cSampleManager.SetSpeakerConfig(conf);
+ SampleManager.SetSpeakerConfig(conf);
}
WRAPPER
@@ -803,8 +803,8 @@ char *
cAudioManager::Get3DProviderName(uint8 id)
{
if(!m_bIsInitialised) return 0;
- if(id >= num3DProvidersAvailable) return 0;
- return asName3DProviders[id];
+ if(id >= SampleManager.GetNum3DProvidersAvailable()) return 0;
+ return SampleManager.Get3DProviderName(id);
}
bool
@@ -825,16 +825,16 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_JUMBO_FLY_SOUND);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_JUMBO_FLY_SOUND);
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = 440.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_48 = 4.0;
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.field_76 = 5;
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
AddSampleToRequestedQueue();
}
return 1;
@@ -854,13 +854,13 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_bIsDistant = 1;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_JUMBO_RUMBLE_SOUND);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_JUMBO_RUMBLE_SOUND);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 4.0;
m_sQueueSample.m_fSoundIntensity = 240.0;
m_sQueueSample.field_56 = 0;
@@ -903,9 +903,9 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 180.0f;
m_sQueueSample.field_56 = 0;
@@ -934,9 +934,9 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 170.0f;
m_sQueueSample.field_56 = 0;
@@ -972,7 +972,7 @@ void
cAudioManager::ResetPoliceRadio()
{
if(m_bIsInitialised) {
- if(cSampleManager.GetChannelUsedFlag(28)) cSampleManager.StopChannel(28);
+ if(SampleManager.GetChannelUsedFlag(28)) SampleManager.StopChannel(28);
InitialisePoliceRadio();
}
}
@@ -1044,13 +1044,13 @@ cAudioManager::RandomDisplacement(uint32 seed)
void
cAudioManager::ReleaseDigitalHandle()
{
- if(m_bIsInitialised) { cSampleManager.ReleaseDigitalHandle(); }
+ if(m_bIsInitialised) { SampleManager.ReleaseDigitalHandle(); }
}
void
-cAudioManager::RequireDigitalHandle()
+cAudioManager::ReacquireDigitalHandle()
{
- if(m_bIsInitialised) { cSampleManager.RequireDigitalHandle(); }
+ if(m_bIsInitialised) { SampleManager.ReacquireDigitalHandle(); }
}
void
@@ -1142,7 +1142,7 @@ uint8 &jumboVolOffset = *(uint8 *)0x6508ED;
void
cAudioManager::DoJumboVolOffset()
{
- if(!(m_nTimeOfRecentCrime % (m_anRandomTable[0] % 6u + 3)))
+ if(!(m_FrameCounter % (m_anRandomTable[0] % 6u + 3)))
jumboVolOffset = m_anRandomTable[1] % 60u;
}
@@ -3448,7 +3448,7 @@ cAudioManager::ProcessActiveQueues()
v6 = (v6 + 92);
}
if(v5->m_nLoopCount) {
- if(m_nTimeOfRecentCrime & 1) {
+ if(m_FrameCounter & 1) {
if(!(j & 1)) {
v8 = 0;
goto LABEL_17;
@@ -3460,7 +3460,7 @@ cAudioManager::ProcessActiveQueues()
v8 = 0;
}
LABEL_17:
- if(v8 && !cSampleManager.GetChannelUsedFlag(j)) {
+ if(v8 && !SampleManager.GetChannelUsedFlag(j)) {
v5->m_bLoopEnded = 1;
m_asActiveSamples[0].m_bLoopEnded = 1;
m_asActiveSamples[0].m_nSampleIndex = NO_SAMPLE;
@@ -3483,8 +3483,8 @@ cAudioManager::ProcessActiveQueues()
} else {
v43 = v5->m_bEmittingVolume;
}
- cSampleManager.SetChannelFrequency(j, v5->m_nFrequency);
- cSampleManager.SetChannelEmittingVolume(j, v43);
+ SampleManager.SetChannelFrequency(j, v5->m_nFrequency);
+ SampleManager.SetChannelEmittingVolume(j, v43);
} else {
v10 = m_asActiveSamples[0].m_fDistance;
v11 = v5->m_fDistance;
@@ -3506,7 +3506,7 @@ cAudioManager::ProcessActiveQueues()
newFreq = activeSampleFreq + 6000;
}
v7->m_nFrequency = newFreq;
- cSampleManager.SetChannelFrequency(j, newFreq);
+ SampleManager.SetChannelFrequency(j, newFreq);
}
v40 = v7->m_bEmittingVolume;
v17 = v5->m_bEmittingVolume;
@@ -3528,16 +3528,16 @@ cAudioManager::ProcessActiveQueues()
} else {
v19 = v41;
}
- cSampleManager.SetChannelEmittingVolume(j, v19);
+ SampleManager.SetChannelEmittingVolume(j, v19);
v7->m_bEmittingVolume = v41;
}
TranslateEntity(&v5->m_vecPos, &a2);
- cSampleManager.SetChannel3DPosition(j, a2.x, a2.y, a2.z);
+ SampleManager.SetChannel3DPosition(j, a2.x, a2.y, a2.z);
v20 = 0.25f * v5->m_fSoundIntensity;
- cSampleManager.SetChannel3DDistances(
+ SampleManager.SetChannel3DDistances(
j, v5->m_fSoundIntensity, v20);
}
- cSampleManager.SetChannelReverbFlag(j, v5->m_bReverbFlag);
+ SampleManager.SetChannelReverbFlag(j, v5->m_bReverbFlag);
continue;
}
v5->m_bIsProcessed = 0;
@@ -3551,7 +3551,7 @@ cAudioManager::ProcessActiveQueues()
for(uint32 i = 0; v22 < m_bActiveSamples; i++) {
if(v23->m_asActiveSamples[0].m_nSampleIndex != NO_SAMPLE &&
!v23->m_asActiveSamples[0].m_bIsProcessed) {
- cSampleManager.StopChannel(i);
+ SampleManager.StopChannel(i);
v23->m_asActiveSamples[0].m_nSampleIndex = NO_SAMPLE;
v23->m_asActiveSamples[0].m_nEntityIndex = -5;
}
@@ -3578,7 +3578,7 @@ cAudioManager::ProcessActiveQueues()
if(!v26->m_nLoopCount) goto LABEL_80;
v28 = v26->m_nFrequency / field_19192;
v29 = v26->m_nLoopCount *
- cSampleManager.GetSampleLength(
+ SampleManager.GetSampleLength(
v26->m_nSampleIndex);
if(v28) {
v26->field_76 = v29 / v28 + 1;
@@ -3604,28 +3604,28 @@ cAudioManager::ProcessActiveQueues()
v45 = v27->m_asActiveSamples[0]
.m_bEmittingVolume;
}
- if(cSampleManager.InitialiseChannel(
+ if(SampleManager.InitialiseChannel(
l,
v27->m_asActiveSamples[0]
.m_nSampleIndex,
v27->m_asActiveSamples[0]
.m_bBankIndex)) {
- cSampleManager.SetChannelFrequency(
+ SampleManager.SetChannelFrequency(
l, v27->m_asActiveSamples[0]
.m_nFrequency);
cSampleManager
.SetChannelEmittingVolume(l,
v45);
- cSampleManager.SetChannelLoopPoints(
+ SampleManager.SetChannelLoopPoints(
l,
v27->m_asActiveSamples[0]
.m_nLoopStart,
v27->m_asActiveSamples[0]
.m_nLoopEnd);
- cSampleManager.SetChannelLoopCount(
+ SampleManager.SetChannelLoopCount(
l, v27->m_asActiveSamples[0]
.m_nLoopCount);
- cSampleManager.SetChannelReverbFlag(
+ SampleManager.SetChannelReverbFlag(
l, v27->m_asActiveSamples[0]
.m_bReverbFlag);
if(v27->m_asActiveSamples[0]
@@ -3656,7 +3656,7 @@ cAudioManager::ProcessActiveQueues()
v35 = v34;
v36 = v33;
v37 = v32;
- cSampleManager.SetChannel3DPosition(
+ SampleManager.SetChannel3DPosition(
l, v37, v36, v35);
v38 = 0.25f *
v27->m_asActiveSamples[0]
@@ -3667,7 +3667,7 @@ cAudioManager::ProcessActiveQueues()
v27->m_asActiveSamples[0]
.m_fSoundIntensity,
v38);
- cSampleManager.StartChannel(l);
+ SampleManager.StartChannel(l);
}
v27->m_asActiveSamples[0].m_bIsProcessed =
1;
@@ -3706,7 +3706,7 @@ cAudioManager::ProcessAirBrakes(cVehicleParams *params)
m_sQueueSample.field_4 = 13;
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_VEHICLE_AIR_BRAKES;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_VEHICLE_AIR_BRAKES);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_VEHICLE_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_bIsDistant = 0;
@@ -3759,7 +3759,7 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex =
(m_anRandomTable[1] & 3) + AUDIO_SAMPLE_AIRPORT_1;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_4 = counter++;
m_sQueueSample.m_bIsDistant = 0;
@@ -3815,9 +3815,9 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 127;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_fSoundIntensity = 400.0f;
m_sQueueSample.field_56 = 0;
@@ -3847,13 +3847,13 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BRIDGE_WARNING);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BRIDGE_WARNING);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 100;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_fSoundIntensity = 450.0f;
m_sQueueSample.field_56 = 0;
@@ -3910,7 +3910,7 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = counter % 3 + AUDIO_SAMPLE_CINEMA_1;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency +=
RandomDisplacement(m_sQueueSample.m_nFrequency >> 2);
@@ -3972,7 +3972,7 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_DOCKS;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_DOCKS);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_DOCKS);
m_sQueueSample.m_nFrequency +=
RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
m_sQueueSample.field_4 = counter++;
@@ -4100,9 +4100,9 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 40;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_fSoundIntensity = 35.0f;
m_sQueueSample.field_56 = 0;
@@ -4249,7 +4249,7 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nFrequency = 48000;
} else {
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
}
m_sQueueSample.m_bVolume = 110;
m_sQueueSample.field_4 = counter++;
@@ -4317,7 +4317,7 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex =
m_anRandomTable[0] % 5u + AUDIO_SAMPLE_HOME_1;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency +=
RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
@@ -4478,7 +4478,7 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_LAUNDERETTE_1;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_LAUNDERETTE_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_LAUNDERETTE_1);
m_sQueueSample.field_4 = 0;
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.m_nLoopCount = 0;
@@ -4487,9 +4487,9 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_bEmittingVolume = 45;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -4500,7 +4500,7 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_LAUNDERETTE_2;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_LAUNDERETTE_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_LAUNDERETTE_2);
m_sQueueSample.field_4 = 1;
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.m_nLoopCount = 0;
@@ -4509,9 +4509,9 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_bEmittingVolume = 110;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -4534,7 +4534,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4546,7 +4546,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4558,7 +4558,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4570,7 +4570,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4582,7 +4582,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_3);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_3);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4594,7 +4594,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_3);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_3);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4606,7 +4606,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_4);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_4);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4618,7 +4618,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_4);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_4);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4630,7 +4630,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_5);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_5);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4642,7 +4642,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_5);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_5);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4654,7 +4654,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_6);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_6);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4666,7 +4666,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_6);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_6);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4678,7 +4678,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_7);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_7);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4690,7 +4690,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_7);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_7);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4702,7 +4702,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_8);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_8);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4714,7 +4714,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_8);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_8);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4726,7 +4726,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_9);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_9);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4738,7 +4738,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_9);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_9);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4750,7 +4750,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_10);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_10);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4762,7 +4762,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_10);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_10);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4774,7 +4774,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_11);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_11);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4786,7 +4786,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_11);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_11);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4798,7 +4798,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_12);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_12);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4810,7 +4810,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_12);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_12);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4822,7 +4822,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_13);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_13);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4834,7 +4834,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_13);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_13);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4846,7 +4846,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_1);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4858,7 +4858,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_1);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4870,7 +4870,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4882,7 +4882,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_STRIP_CLUB_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4900,7 +4900,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_409);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_409);
m_sQueueSample.field_16 = 6;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4912,7 +4912,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_409);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_409);
m_sQueueSample.field_16 = 6;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4926,7 +4926,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CHINATOWN_RESTAURANT);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CHINATOWN_RESTAURANT);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4938,7 +4938,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CHINATOWN_RESTAURANT);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CHINATOWN_RESTAURANT);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4950,7 +4950,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CIPRIANI_RESTAURANT);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CIPRIANI_RESTAURANT);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4962,7 +4962,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CIPRIANI_RESTAURANT);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_CIPRIANI_RESTAURANT);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4974,7 +4974,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_414);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_414);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4986,7 +4986,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_414);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_414);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -4998,7 +4998,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_MARCO_BISTRO);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_MARCO_BISTRO);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5010,7 +5010,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 110;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_MARCO_BISTRO);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_MARCO_BISTRO);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5032,7 +5032,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_FRANKIE_PIANO);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_FRANKIE_PIANO);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5044,7 +5044,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_PARTY_1);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5064,7 +5064,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 90;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BANK_ALARM);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BANK_ALARM);
m_sQueueSample.field_16 = 2;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5076,7 +5076,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 90;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BANK_ALARM);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_BANK_ALARM);
m_sQueueSample.field_16 = 2;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5088,7 +5088,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_BALL);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_BALL);
m_sQueueSample.field_16 = 2;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5100,7 +5100,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_BALL);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_POLICE_BALL);
m_sQueueSample.field_16 = 2;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5112,7 +5112,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_INDUSTRIAL);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_INDUSTRIAL);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5124,7 +5124,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_INDUSTRIAL);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_INDUSTRIAL);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5141,7 +5141,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5154,7 +5154,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5166,7 +5166,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5178,7 +5178,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_2);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_RAVE_2);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_76 = 3;
m_sQueueSample.field_48 = 2.0f;
@@ -5190,7 +5190,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = 0;
emittingVolume = 80;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_FIRE_ENTITY);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_FIRE_ENTITY);
m_sQueueSample.field_16 = 8;
m_sQueueSample.field_76 = 10;
m_sQueueSample.field_48 = 2.0f;
@@ -5211,9 +5211,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
}
@@ -5323,7 +5323,7 @@ cAudioManager::ProcessPornCinema(uint8 sound)
ComputeVolume(maxVolume, m_sQueueSample.m_fSoundIntensity,
m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_4 = 0;
m_sQueueSample.m_bIsDistant = 0;
@@ -5333,9 +5333,9 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(
+ SampleManager.GetSampleLoopStartOffset(
m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = cSampleManager.GetSampleLoopEndOffset(
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
@@ -5350,7 +5350,7 @@ cAudioManager::ProcessPornCinema(uint8 sound)
if(m_sQueueSample.m_bVolume) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + sample;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency +=
RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
@@ -5402,7 +5402,7 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_SAWMILL_1;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_SAWMILL_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_SAWMILL_1);
m_sQueueSample.field_4 = 0;
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.m_nLoopCount = 0;
@@ -5411,9 +5411,9 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -5425,7 +5425,7 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_SAWMILL_2;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_4 = 1;
m_sQueueSample.m_bIsDistant = 0;
@@ -5476,7 +5476,7 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_SHOP_1;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_SHOP_1);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_SHOP_1);
m_sQueueSample.field_4 = 0;
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.m_nLoopCount = 0;
@@ -5485,9 +5485,9 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
cAudioManager::AddSampleToRequestedQueue();
@@ -5500,7 +5500,7 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + AUDIO_SAMPLE_SHOP_2;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_nFrequency = cSampleManager.GetSampleBaseFrequency(
+ m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_4 = rand + 1;
m_sQueueSample.m_bIsDistant = 0;
@@ -5526,8 +5526,8 @@ cAudioManager::ProcessSpecial()
if(m_bUserPause) {
if(!m_bPreviousUserPause) {
MusicManager.ChangeMusicMode(0);
- cSampleManager.SetEffectsFadeVol(maxVolume);
- cSampleManager.SetMusicFadeVol(maxVolume);
+ SampleManager.SetEffectsFadeVolume(maxVolume);
+ SampleManager.SetMusicFadeVolume(maxVolume);
}
} else {
if(m_bPreviousUserPause) {
@@ -5539,7 +5539,7 @@ cAudioManager::ProcessSpecial()
const PedState &state = playerPed->m_nPedState;
if(state != PED_ENTER_CAR && state != PED_STEAL_CAR &&
!playerPed->bInVehicle)
- cSampleManager.StopChannel(m_bActiveSamples);
+ SampleManager.StopChannel(m_bActiveSamples);
}
}
}
@@ -5592,7 +5592,7 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = AUDIO_SAMPLE_WORK_SHOP;
m_sQueueSample.m_bBankIndex = 0;
m_sQueueSample.m_nFrequency =
- cSampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_WORK_SHOP);
+ SampleManager.GetSampleBaseFrequency(AUDIO_SAMPLE_WORK_SHOP);
m_sQueueSample.field_4 = 0;
m_sQueueSample.m_bIsDistant = 0;
m_sQueueSample.m_nLoopCount = 0;
@@ -5601,9 +5601,9 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.field_48 = 2.0;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
- cSampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
- cSampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -5623,7 +5623,7 @@ InjectHook(0x56AD30, &cAudioManager::AddPlayerCarSample, PATCH_JUMP);
InjectHook(0x57B300, &cAudioManager::AddReflectionsToRequestedQueue, PATCH_JUMP);
// InjectHook(0x57B8D0, &cAudioManager::AddReleasingSounds, PATCH_JUMP);
InjectHook(0x57B070, &cAudioManager::AddSampleToRequestedQueue, PATCH_JUMP);
-InjectHook(0x57A8F0, &cAudioManager::AutoDetect3DProviders, PATCH_JUMP);
+InjectHook(0x57A8F0, &cAudioManager::GetCurrent3DProviderIndex, PATCH_JUMP);
// InjectHook(0x580AF0, &cAudioManager::AgeCrimes, PATCH_JUMP);
InjectHook(0x5697A0, &cAudioManager::CalculateDistance, PATCH_JUMP);
@@ -5657,8 +5657,8 @@ InjectHook(0x57AA30, &cAudioManager::GetCDAudioDriveLetter, PATCH_JUMP);
InjectHook(0x57A730, &cAudioManager::SetEffectsMasterVolume, PATCH_JUMP);
InjectHook(0x57A750, &cAudioManager::SetMusicMasterVolume, PATCH_JUMP);
-InjectHook(0x57A770, &cAudioManager::SetEffectsFadeVol, PATCH_JUMP);
-InjectHook(0x57A790, &cAudioManager::SetMusicFadeVol, PATCH_JUMP);
+InjectHook(0x57A770, &cAudioManager::SetEffectsFadeVolume, PATCH_JUMP);
+InjectHook(0x57A790, &cAudioManager::SetMusicFadeVolume, PATCH_JUMP);
InjectHook(0x57A9A0, &cAudioManager::SetSpeakerConfig, PATCH_JUMP);
@@ -5694,7 +5694,7 @@ InjectHook(0x579650, &cAudioManager::IsMissionAudioSampleFinished, PATCH_JUMP);
InjectHook(0x57AF90, &cAudioManager::RandomDisplacement, PATCH_JUMP);
InjectHook(0x57A9E0, &cAudioManager::ReleaseDigitalHandle, PATCH_JUMP);
-InjectHook(0x57A9F0, &cAudioManager::RequireDigitalHandle, PATCH_JUMP);
+InjectHook(0x57A9F0, &cAudioManager::ReacquireDigitalHandle, PATCH_JUMP);
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);