summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioCollision.cpp20
-rw-r--r--src/audio/AudioManager.cpp1068
-rw-r--r--src/audio/AudioManager.h7
-rw-r--r--src/audio/DMAudio.cpp2
-rw-r--r--src/audio/DMAudio.h2
-rw-r--r--src/audio/MusicManager.cpp831
-rw-r--r--src/audio/MusicManager.h64
-rw-r--r--src/audio/PoliceRadio.cpp8
-rw-r--r--src/audio/audio_enums.h400
-rw-r--r--src/audio/sampman.h1
10 files changed, 1552 insertions, 851 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 0f5196ea..6c998a34 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -150,8 +150,8 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = counter;
m_sQueueSample.m_vecPos = col->m_vecPosition;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 7;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -163,8 +163,8 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -269,8 +269,8 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
m_sQueueSample.m_counter = counter++;
if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col->m_vecPosition;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 11;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -279,8 +279,8 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
m_sQueueSample.field_48 = 4.0f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -320,8 +320,8 @@ cAudioManager::ServiceCollisions()
if (!someArr2[i]) {
m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil;
m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil;
- m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = 0;
- m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = 0;
+ m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = SURFACE_DEFAULT;
+ m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = SURFACE_DEFAULT;
m_sCollisionManager.m_asCollisions2[i].m_fIntensity2 = 0.0f;
m_sCollisionManager.m_asCollisions2[i].m_fIntensity1 = 0.0f;
m_sCollisionManager.m_asCollisions2[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 974ce927..89abee8d 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -208,7 +208,7 @@ cPedComments::Process()
m_asPedComments[activeBank][indexMap[activeBank][0]].m_entityIndex;
AudioManager.m_sQueueSample.m_counter = 0;
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
- AudioManager.m_sQueueSample.m_bBankIndex = 1;
+ AudioManager.m_sQueueSample.m_bBankIndex = SAMPLEBANK_PED;
AudioManager.m_sQueueSample.field_16 = 3;
AudioManager.m_sQueueSample.m_bVolume =
m_asPedComments[activeBank][indexMap[activeBank][0]].m_bVolume;
@@ -232,14 +232,14 @@ cPedComments::Process()
m_asPedComments[activeBank][indexMap[activeBank][0]].m_vecPos;
if(sampleIndex >= SFX_AMMU_D && sampleIndex <= SFX_AMMU_F) {
- AudioManager.m_sQueueSample.m_bReverbFlag = 0;
- AudioManager.m_sQueueSample.m_bRequireReflection = 0;
+ AudioManager.m_sQueueSample.m_bReverbFlag = false;
+ AudioManager.m_sQueueSample.m_bRequireReflection = false;
} else {
- AudioManager.m_sQueueSample.m_bReverbFlag = 1;
- AudioManager.m_sQueueSample.m_bRequireReflection = 1;
+ AudioManager.m_sQueueSample.m_bReverbFlag = true;
+ AudioManager.m_sQueueSample.m_bRequireReflection = true;
}
- AudioManager.m_sQueueSample.m_bIsDistant = 0;
+ AudioManager.m_sQueueSample.m_bIsDistant = false;
AudioManager.m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(AudioManager.m_sQueueSample.m_nSampleIndex) +
AudioManager.RandomDisplacement(750);
@@ -250,11 +250,11 @@ cPedComments::Process()
// Switch bank
if(activeBank) {
- actualUsedBank = 1;
- activeBank = 0;
+ actualUsedBank = SAMPLEBANK_PED;
+ activeBank = SAMPLEBANK_MAIN;
} else {
- actualUsedBank = 0;
- activeBank = 1;
+ actualUsedBank = SAMPLEBANK_MAIN;
+ activeBank = SAMPLEBANK_PED;
}
comment = m_asPedComments[actualUsedBank];
for(uint32 i = 0; i < nrOfCommentsInBank[actualUsedBank]; i++) {
@@ -295,8 +295,8 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = counter;
m_sQueueSample.m_nSampleIndex = sample;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 0;
m_sQueueSample.m_nFrequency = freq;
if(notLooping) {
@@ -311,8 +311,8 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
m_sQueueSample.field_48 = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -421,7 +421,7 @@ cAudioManager::AddSampleToRequestedQueue()
m_sQueueSample.calculatedVolume = calculatedVolume;
m_sQueueSample.m_bLoopEnded = 0;
if(m_sQueueSample.m_bIsDistant) {
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bRequireReflection = false;
m_sQueueSample.m_bLoopsRemaining = 0;
}
if(m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) {
@@ -430,9 +430,9 @@ cAudioManager::AddSampleToRequestedQueue()
bReflections = false;
m_sQueueSample.m_bLoopsRemaining = 0;
}
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bRequireReflection = false;
- if(!m_bDynamicAcousticModelingStatus) m_sQueueSample.m_bReverbFlag = 0;
+ if(!m_bDynamicAcousticModelingStatus) m_sQueueSample.m_bReverbFlag = false;
m_asSamples[m_bActiveSampleQueue][sampleIndex] = m_sQueueSample;
@@ -463,8 +463,8 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
m_asActiveSamples[i].m_counter = 0;
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
- m_asActiveSamples[i].m_bBankIndex = 3;
- m_asActiveSamples[i].m_bIsDistant = 0;
+ m_asActiveSamples[i].m_bBankIndex = SAMPLEBANK_INVALID;
+ m_asActiveSamples[i].m_bIsDistant = false;
m_asActiveSamples[i].field_16 = 5;
m_asActiveSamples[i].m_nFrequency = 0;
m_asActiveSamples[i].m_bVolume = 0;
@@ -483,9 +483,9 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].field_76 = 0;
m_asActiveSamples[i].field_88 = -1;
m_asActiveSamples[i].m_vecPos = {0.0f, 0.0f, 0.0f};
- m_asActiveSamples[i].m_bReverbFlag = 0;
+ m_asActiveSamples[i].m_bReverbFlag = false;
m_asActiveSamples[i].m_bLoopsRemaining = 0;
- m_asActiveSamples[i].m_bRequireReflection = 0;
+ m_asActiveSamples[i].m_bRequireReflection = false;
}
}
@@ -559,9 +559,9 @@ cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float d
int32
cAudioManager::CreateEntity(int32 type, void *entity)
{
- if(!m_bIsInitialised) return -4;
- if(!entity) return -2;
- if(type >= TOTAL_AUDIO_TYPES) return -1;
+ if(!m_bIsInitialised) return AEHANDLE_ERROR_NOAUDIOSYS;
+ if(!entity) return AEHANDLE_ERROR_NOENTITY;
+ if(type >= TOTAL_AUDIO_TYPES) return AEHANDLE_ERROR_BADAUDIOTYPE;
for(uint32 i = 0; i < 200; i++) {
if(!m_asAudioEntities[i].m_bIsUsed) {
m_asAudioEntities[i].m_bIsUsed = true;
@@ -577,7 +577,7 @@ cAudioManager::CreateEntity(int32 type, void *entity)
return i;
}
}
- return -3;
+ return AEHANDLE_ERROR_NOFREESLOT;
}
void
@@ -2456,7 +2456,7 @@ cAudioManager::IsMP3RadioChannelAvailable() const
{
if(m_bIsInitialised) return SampleManager.IsMP3RadioChannelAvailable();
- return 0;
+ return false;
}
bool
@@ -2582,7 +2582,7 @@ cAudioManager::PostInitialiseGameSpecificSetup()
m_sMissionAudio.m_bLoadingStatus = 0;
m_sMissionAudio.m_bPlayStatus = 0;
m_sMissionAudio.field_22 = 0;
- m_sMissionAudio.m_bIsPlayed = 0;
+ m_sMissionAudio.m_bIsPlayed = false;
m_sMissionAudio.field_12 = 1;
m_sMissionAudio.field_24 = 0;
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
@@ -2597,8 +2597,8 @@ cAudioManager::PostTerminateGameSpecificShutdown()
void
cAudioManager::PreInitialiseGameSpecificSetup() const
{
- BankStartOffset[0] = SFX_CAR_HORN_JEEP;
- BankStartOffset[1] = SFX_COP_VOICE_1_ARREST_1;
+ BankStartOffset[SAMPLEBANK_MAIN] = SFX_CAR_HORN_JEEP;
+ BankStartOffset[SAMPLEBANK_PED] = SFX_COP_VOICE_1_ARREST_1;
}
struct MissionAudioData {
@@ -2682,7 +2682,7 @@ cAudioManager::PreloadMissionAudio(const char *name)
m_sMissionAudio.field_24 =
field_19192 * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_sMissionAudio.field_24 *= 4;
- m_sMissionAudio.m_bIsPlayed = 0;
+ m_sMissionAudio.m_bIsPlayed = false;
m_sMissionAudio.field_12 = 1;
g_bMissionAudioLoadFailed = 0;
}
@@ -2735,13 +2735,13 @@ cAudioManager::ProcessAirBrakes(cVehicleParams *params)
CAutomobile *automobile;
uint8 rand;
- if(params->m_fDistance > 900.0f) return 0;
+ if(params->m_fDistance > 900.0f) return false;
automobile = (CAutomobile *)params->m_pVehicle;
- if(!automobile->bEngineOn) return 1;
+ if(!automobile->bEngineOn) return true;
if((automobile->m_fVelocityChangeForAudio < 0.025f || params->m_fVelocityChange >= 0.025f) &&
(automobile->m_fVelocityChangeForAudio > -0.025f || params->m_fVelocityChange <= 0.025f))
- return 1;
+ return true;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
rand = m_anRandomTable[0] % 10 + 70;
@@ -2751,8 +2751,8 @@ cAudioManager::ProcessAirBrakes(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = rand;
@@ -2761,12 +2761,12 @@ cAudioManager::ProcessAirBrakes(cVehicleParams *params)
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
void
@@ -2798,11 +2798,11 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_AIRPORT_ANNOUNCEMENT_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -2810,8 +2810,8 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = 110;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gAirportNextTime = time + 10000 + m_anRandomTable[3] % 20000;
}
@@ -2842,8 +2842,8 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
m_sQueueSample.m_nFrequency = 10386;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 80;
@@ -2855,8 +2855,8 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 7;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
if(FindPlayerVehicle() == params->m_pVehicle) {
@@ -2886,8 +2886,8 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_counter = 40;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -2898,8 +2898,8 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 7;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
} else {
if(FindPlayerVehicle() == params->m_pVehicle) {
if(Pads[0].GetAccelerate() <= Pads[0].GetBrake())
@@ -2945,8 +2945,8 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
if(!m_sQueueSample.m_bVolume) return 1;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -2957,13 +2957,13 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 7;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
}
AddSampleToRequestedQueue();
- return 1;
+ return true;
}
- return 0;
+ return false;
}
bool
@@ -2973,10 +2973,10 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
int32 vol;
float multiplier;
- if(params->m_fDistance > 2500.f) return 0;
+ if(params->m_fDistance > 2500.f) return false;
velocityChange = Abs(params->m_fVelocityChange);
- if(velocityChange <= 0.0005f && params->m_pVehicle->GetPosition().y) return 1;
+ if(velocityChange <= 0.0005f && params->m_pVehicle->GetPosition().y) return true;
velocityChange = min(0.75f, velocityChange);
multiplier = (velocityChange - 0.0005f) * 1.3342f;
@@ -2986,8 +2986,8 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 38;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
@@ -2998,12 +2998,12 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
void
@@ -3041,8 +3041,8 @@ cAudioManager::ProcessBridgeMotor()
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
@@ -3054,7 +3054,7 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_fSoundIntensity = 400.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 0;
+ m_sQueueSample.m_bReverbFlag = false;
AddSampleToRequestedQueue();
}
}
@@ -3091,8 +3091,8 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.m_bVolume = ComputeVolume(maxVolume, maxDist, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 2;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
@@ -3103,8 +3103,8 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_fSoundIntensity = maxDist;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -3118,8 +3118,8 @@ cAudioManager::ProcessBridgeWarning()
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = 457;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
@@ -3131,8 +3131,8 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_fSoundIntensity = 450.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 8;
- m_sQueueSample.m_bReverbFlag = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -3143,7 +3143,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams *params)
{
CAutomobile *automobile;
- if(params->m_fDistance >= 1600.f) return 0;
+ if(params->m_fDistance >= 1600.f) return false;
automobile = (CAutomobile *)params->m_pVehicle;
if(automobile->bEngineOn && automobile->m_bombType == CARBOMB_TIMEDACTIVE) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -3151,8 +3151,8 @@ cAudioManager::ProcessCarBombTick(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 35;
m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
@@ -3164,12 +3164,12 @@ cAudioManager::ProcessCarBombTick(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 40.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
- return 1;
+ return true;
}
WRAPPER
@@ -3208,12 +3208,12 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = counter % 3 + SFX_CINEMA_BASS_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 4);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -3221,8 +3221,8 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gCinemaNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -3268,11 +3268,11 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_DOCKS_FOGHORN;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOCKS_FOGHORN);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -3280,8 +3280,8 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gDocksNextTime = time + 10000 + m_anRandomTable[3] % 40000;
}
@@ -3296,11 +3296,11 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
uint8 engineStatus;
uint8 emittingVolume;
- if(params->m_fDistance >= 1600.f) return 0;
+ if(params->m_fDistance >= 1600.f) return false;
veh = (CAutomobile *)params->m_pVehicle;
if(veh->bEngineOn) {
engineStatus = veh->Damage.GetEngineStatus();
- if(engineStatus > 250u || engineStatus < 100) return 1;
+ if(engineStatus > 250u || engineStatus < 100) return true;
if(engineStatus < 225) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
emittingVolume = 6;
@@ -3316,8 +3316,8 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
m_sQueueSample.m_bVolume = ComputeVolume(emittingVolume, 40.f, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 28;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
@@ -3327,12 +3327,12 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 40.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
- return 1;
+ return true;
}
void
@@ -3343,53 +3343,53 @@ cAudioManager::ProcessEntity(int32 id)
switch(m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessPhysical(id);
}
break;
case AUDIOTYPE_EXPLOSION:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessExplosions(id);
}
break;
case AUDIOTYPE_FIRE:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessFires(id);
}
break;
case AUDIOTYPE_WEATHER:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessWeather(id);
}
break;
case AUDIOTYPE_CRANE:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessCrane();
}
break;
case AUDIOTYPE_SCRIPTOBJECT:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessScriptObject(id);
}
break;
case AUDIOTYPE_BRIDGE:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessBridge();
}
break;
case AUDIOTYPE_FRONTEND:
- m_sQueueSample.m_bReverbFlag = 0;
+ m_sQueueSample.m_bReverbFlag = false;
ProcessFrontEnd();
break;
case AUDIOTYPE_PROJECTILE:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessProjectiles();
}
break;
@@ -3398,13 +3398,13 @@ cAudioManager::ProcessEntity(int32 id)
break;
case AUDIOTYPE_FIREHYDRANT:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessFireHydrant();
}
break;
case AUDIOTYPE_WATERCANNON:
if(!m_bUserPause) {
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
ProcessWaterCannon(id);
}
break;
@@ -3435,7 +3435,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
case EXPLOSION_MOLOTOV:
maxDist = 40000.f;
@@ -3443,7 +3443,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_3;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
@@ -3452,7 +3452,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
default:
maxDist = 160000.f;
@@ -3462,7 +3462,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
if(type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10;
m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
}
pos = CExplosion::GetExplosionPosition(i);
@@ -3475,15 +3475,15 @@ cAudioManager::ProcessExplosions(int32 explosion)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i;
m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = true;
AddSampleToRequestedQueue();
}
}
@@ -3497,7 +3497,7 @@ cAudioManager::ProcessFireHydrant()
float distSquared;
bool distCalculated = false;
- m_sQueueSample.m_vecPos = *(CVector *)((size_t)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity + 52);
+ m_sQueueSample.m_vecPos = ((CEntity*)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos);
if(distSquared < 1225.f) {
CalculateDistance(distCalculated, distSquared);
@@ -3505,8 +3505,8 @@ cAudioManager::ProcessFireHydrant()
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nLoopCount = 0;
@@ -3518,8 +3518,8 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_fSoundIntensity = 35.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -3535,7 +3535,7 @@ cAudioManager::ProcessFires(int32 entity)
void
cAudioManager::ProcessFrontEnd()
{
- bool processed;
+ bool stereo;
bool processedPickup;
bool processedMission;
int16 sample;
@@ -3545,9 +3545,9 @@ cAudioManager::ProcessFrontEnd()
static uint32 cPartMisComNextFrame = 0;
for(uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- processedPickup = 0;
- processed = 0;
- processedMission = 0;
+ processedPickup = false;
+ stereo = false;
+ processedMission = false;
switch(m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM: m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE; break;
case SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM:
@@ -3557,7 +3557,7 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BAD_VEHICLE:
case SOUND_3C:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_GARAGE_OPENING:
case SOUND_GARAGE_BOMB1_SET:
@@ -3574,18 +3574,18 @@ cAudioManager::ProcessFrontEnd()
case SOUND_UNLOAD_GOLD:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_2_LEFT;
processedPickup = true;
- processed = true;
+ stereo = true;
break;
case SOUND_PICKUP_WEAPON_BOUGHT:
case SOUND_PICKUP_WEAPON:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_1_LEFT;
processedPickup = true;
- processed = true;
+ stereo = true;
break;
case SOUND_4A:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
processedPickup = true;
- processed = true;
+ stereo = true;
break;
case SOUND_PICKUP_BONUS:
case SOUND_PICKUP_MONEY:
@@ -3595,7 +3595,7 @@ cAudioManager::ProcessFrontEnd()
case SOUND_PICKUP_FLOAT_PACKAGE:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_3_LEFT;
processedPickup = true;
- processed = true;
+ stereo = true;
break;
case SOUND_PAGER: m_sQueueSample.m_nSampleIndex = SFX_PAGER; break;
case SOUND_RACE_START_3:
@@ -3609,27 +3609,27 @@ cAudioManager::ProcessFrontEnd()
break;
case SOUND_FRONTEND_MENU_STARTING:
m_sQueueSample.m_nSampleIndex = SFX_START_BUTTON_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_FRONTEND_MENU_COMPLETED:
m_sQueueSample.m_nSampleIndex = SFX_PAGE_CHANGE_AND_BACK_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_FRONTEND_MENU_DENIED:
m_sQueueSample.m_nSampleIndex = SFX_HIGHLIGHT_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_FRONTEND_MENU_SUCCESS:
m_sQueueSample.m_nSampleIndex = SFX_SELECT_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_FRONTEND_EXIT:
m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_9A:
m_sQueueSample.m_nSampleIndex = SFX_STEREO_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_9B: m_sQueueSample.m_nSampleIndex = SFX_MONO; break;
case SOUND_FRONTEND_AUDIO_TEST:
@@ -3637,7 +3637,7 @@ cAudioManager::ProcessFrontEnd()
break;
case SOUND_FRONTEND_FAIL:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_LEFT;
- processed = true;
+ stereo = true;
break;
case SOUND_FRONTEND_NO_RADIO:
case SOUND_FRONTEND_RADIO_CHANGE: m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK; break;
@@ -3669,20 +3669,20 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_counter = counter++;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- if(processed)
+ if(stereo)
m_sQueueSample.m_bOffset = m_anRandomTable[0] & 0x1F;
else
m_sQueueSample.m_bOffset = 63;
- m_sQueueSample.m_bReverbFlag = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
- if(processed) {
+ if(stereo) {
++m_sQueueSample.m_nSampleIndex;
m_sQueueSample.m_counter = counter++;
m_sQueueSample.m_bOffset = maxVolume - m_sQueueSample.m_bOffset;
@@ -3715,14 +3715,14 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
static constexpr tHelicopterSampleData gHeliSfxRanges[3] = {
{400.f, 380.f, 100}, {100.f, 70.f, maxVolume}, {60.f, 30.f, maxVolume}};
- if(gHeliSfxRanges[0].m_fMaxDistance * gHeliSfxRanges[0].m_fMaxDistance <= params->m_fDistance) return 0;
+ if(gHeliSfxRanges[0].m_fMaxDistance * gHeliSfxRanges[0].m_fMaxDistance <= params->m_fDistance) return false;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
heli = (CHeli *)params->m_pVehicle;
for(uint32 i = 0; i < 3; i++) {
MaxDist = gHeliSfxRanges[i].m_fMaxDistance;
dist = m_sQueueSample.m_fDistance;
- if(dist >= MaxDist) return 1;
+ if(dist >= MaxDist) return true;
baseDist = gHeliSfxRanges[i].m_fBaseDistance;
if(dist < baseDist)
emittingVol = (gHeliSfxRanges[i].m_bBaseVolume * ((MaxDist - dist) / (MaxDist - baseDist)));
@@ -3734,8 +3734,8 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i + 65;
m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 0;
m_sQueueSample.m_nFrequency = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
@@ -3748,12 +3748,12 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
- return 1;
+ return true;
}
void
@@ -3787,12 +3787,12 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 5 + SFX_HOME_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -3800,8 +3800,8 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = true;
AddSampleToRequestedQueue();
gHomeNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -3941,10 +3941,10 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
ComputeVolume(45, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 5;
@@ -3953,18 +3953,18 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
m_sQueueSample.m_bVolume =
ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_SONG_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_SONG_LOOP);
m_sQueueSample.m_counter = 1;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 3;
@@ -3973,8 +3973,8 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -3992,7 +3992,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.field_16 = 3;
@@ -4003,7 +4003,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.field_16 = 3;
@@ -4014,7 +4014,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
m_sQueueSample.field_16 = 3;
@@ -4025,7 +4025,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
m_sQueueSample.field_16 = 3;
@@ -4036,7 +4036,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
m_sQueueSample.field_16 = 3;
@@ -4047,7 +4047,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
m_sQueueSample.field_16 = 3;
@@ -4058,7 +4058,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
m_sQueueSample.field_16 = 3;
@@ -4069,7 +4069,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
m_sQueueSample.field_16 = 3;
@@ -4080,7 +4080,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
m_sQueueSample.field_16 = 3;
@@ -4091,7 +4091,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
m_sQueueSample.field_16 = 3;
@@ -4102,7 +4102,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
m_sQueueSample.field_16 = 3;
@@ -4113,7 +4113,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
m_sQueueSample.field_16 = 3;
@@ -4124,7 +4124,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
m_sQueueSample.field_16 = 3;
@@ -4135,7 +4135,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
m_sQueueSample.field_16 = 3;
@@ -4146,7 +4146,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
m_sQueueSample.field_16 = 3;
@@ -4157,7 +4157,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
m_sQueueSample.field_16 = 3;
@@ -4168,7 +4168,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
m_sQueueSample.field_16 = 3;
@@ -4179,7 +4179,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
m_sQueueSample.field_16 = 3;
@@ -4190,7 +4190,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
m_sQueueSample.field_16 = 3;
@@ -4201,7 +4201,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
m_sQueueSample.field_16 = 3;
@@ -4212,7 +4212,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
m_sQueueSample.field_16 = 3;
@@ -4223,7 +4223,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
m_sQueueSample.field_16 = 3;
@@ -4234,7 +4234,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
m_sQueueSample.field_16 = 3;
@@ -4245,7 +4245,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
m_sQueueSample.field_16 = 3;
@@ -4256,7 +4256,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
m_sQueueSample.field_16 = 3;
@@ -4267,7 +4267,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
m_sQueueSample.field_16 = 3;
@@ -4278,7 +4278,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
m_sQueueSample.field_16 = 3;
@@ -4289,7 +4289,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
m_sQueueSample.field_16 = 3;
@@ -4300,7 +4300,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
m_sQueueSample.field_16 = 3;
@@ -4311,7 +4311,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
m_sQueueSample.field_16 = 3;
@@ -4326,7 +4326,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
m_sQueueSample.field_16 = 6;
@@ -4337,7 +4337,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
m_sQueueSample.field_16 = 6;
@@ -4350,7 +4350,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
m_sQueueSample.field_16 = 3;
@@ -4361,7 +4361,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
m_sQueueSample.field_16 = 3;
@@ -4372,7 +4372,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
m_sQueueSample.field_16 = 3;
@@ -4383,7 +4383,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
m_sQueueSample.field_16 = 3;
@@ -4394,7 +4394,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
m_sQueueSample.field_16 = 3;
@@ -4405,7 +4405,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
m_sQueueSample.field_16 = 3;
@@ -4416,7 +4416,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
m_sQueueSample.field_16 = 3;
@@ -4427,7 +4427,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
m_sQueueSample.field_16 = 3;
@@ -4448,7 +4448,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_PIANO_BAR_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PIANO_BAR_1);
m_sQueueSample.field_16 = 3;
@@ -4459,7 +4459,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
m_sQueueSample.field_16 = 3;
@@ -4478,7 +4478,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
m_sQueueSample.field_16 = 2;
@@ -4489,7 +4489,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
m_sQueueSample.field_16 = 2;
@@ -4500,7 +4500,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
m_sQueueSample.field_16 = 2;
@@ -4511,7 +4511,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
m_sQueueSample.field_16 = 2;
@@ -4522,7 +4522,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
m_sQueueSample.field_16 = 3;
@@ -4533,7 +4533,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
m_sQueueSample.field_16 = 3;
@@ -4547,7 +4547,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_16 = 3;
@@ -4559,7 +4559,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_16 = 3;
@@ -4570,7 +4570,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
m_sQueueSample.field_16 = 3;
@@ -4581,7 +4581,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
m_sQueueSample.field_16 = 3;
@@ -4592,7 +4592,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
maxDist = 2500.f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.field_16 = 8;
@@ -4609,15 +4609,15 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -4782,8 +4782,8 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_nSampleIndex = SFX_REMOTE_CONTROLLED_CAR;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency =
(11025.f * velocityChange / params->m_pTransmission->fMaxVelocity +
@@ -4798,8 +4798,8 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -4841,15 +4841,15 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
maxDist = 1600.f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_COL_GATE;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
if(sound == SCRIPT_SOUND_GATE_START_CLUNK)
m_sQueueSample.m_nFrequency = 10600;
else
m_sQueueSample.m_nFrequency = 9000;
m_sQueueSample.field_16 = 1;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
emittingVolume = RandomDisplacement(10) + 50;
break;
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
@@ -4858,12 +4858,12 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
maxDist = 2500.f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[iSound % 5] % 3 + SFX_BULLET_WALL_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
m_sQueueSample.field_16 = 9;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
emittingVolume = m_anRandomTable[2] % 20 + 90;
break;
case SCRIPT_SOUND_110:
@@ -4872,118 +4872,118 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_STATION_ANNOUNCE;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
m_sQueueSample.field_16 = 0;
m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_PHONE_RING;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING);
m_sQueueSample.field_16 = 1;
m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = false;
break;
case SCRIPT_SOUND_GLASS_BREAK_L:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
break;
case SCRIPT_SOUND_GLASS_BREAK_S:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
break;
case SCRIPT_SOUND_GLASS_CRACK:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SCRIPT_SOUND_GLASS_LIGHT_BREAK:
maxDist = 3025.f;
m_sQueueSample.m_fSoundIntensity = 55.0f;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[4] & 3) + SFX_GLASS_SHARD_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000;
m_sQueueSample.field_16 = 9;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
emittingVolume = RandomDisplacement(11) + 25;
break;
case SCRIPT_SOUND_BOX_DESTROYED_1:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_WOODEN_BOX_SMASH;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_BOX_DESTROYED_2:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_CARDBOARD_BOX_SMASH;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_METAL_COLLISION:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 5 + SFX_COL_CAR_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 30 + 70;
break;
case SCRIPT_SOUND_TIRE_COLLISION:
maxDist = 3600.f;
m_sQueueSample.m_fSoundIntensity = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_GUNSHELL_DROP:
@@ -5003,9 +5003,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.field_16 = 18;
maxDist = 400.f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos);
if(distSquared < maxDist) {
@@ -5020,7 +5020,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
AddSampleToRequestedQueue();
}
}
@@ -5034,9 +5034,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.field_16 = 15;
maxDist = 400.f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
case SCRIPT_SOUND_GUNSHELL_DROP_SOFT:
@@ -5045,9 +5045,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.field_16 = 18;
maxDist = 400.f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
default: return;
@@ -5065,7 +5065,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
AddSampleToRequestedQueue();
}
}
@@ -5119,8 +5119,8 @@ cAudioManager::ProcessPedHeadphones(cPedParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 64;
m_sQueueSample.m_nSampleIndex = SFX_HEADPHONES;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 5;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_HEADPHONES);
@@ -5134,8 +5134,8 @@ cAudioManager::ProcessPedHeadphones(cPedParams *params)
m_sQueueSample.m_fSoundIntensity = 7.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
return;
@@ -5159,7 +5159,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
CPed *ped = params->m_pPed;
- char processed;
+ bool stereo;
int16 sound;
char noReflection;
CWeapon *weapon;
@@ -5170,8 +5170,8 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
weapon = nil;
for(uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
noReflection = 0;
- processed = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ stereo = 0;
+ m_sQueueSample.m_bRequireReflection = false;
sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch(sound) {
case SOUND_STEP_START:
@@ -5221,7 +5221,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
break;
}
m_sQueueSample.m_nSampleIndex = sampleIndex;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter =
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] - 28;
m_sQueueSample.m_nFrequency =
@@ -5246,9 +5246,9 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
}
break;
case SOUND_FALL_LAND:
@@ -5264,7 +5264,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
} else {
m_sQueueSample.m_nSampleIndex = SFX_BODY_LAND_AND_FALL;
}
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
@@ -5276,18 +5276,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
}
break;
case SOUND_FIGHT_PUNCH_33:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
m_sQueueSample.m_nFrequency = 18000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5298,16 +5298,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_KICK_34:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
m_sQueueSample.m_nFrequency = 16500;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5318,16 +5318,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_HEADBUTT_35:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
m_sQueueSample.m_nFrequency = 20000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5338,16 +5338,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_36:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_2;
m_sQueueSample.m_nFrequency = 18000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5358,16 +5358,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_37:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_2;
m_sQueueSample.m_nFrequency = 16500;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5378,16 +5378,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_CLOSE_PUNCH_38:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_2;
m_sQueueSample.m_nFrequency = 20000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5398,16 +5398,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_39:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_4;
m_sQueueSample.m_nFrequency = 18000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5418,16 +5418,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_OR_KICK_BELOW_40:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_4;
m_sQueueSample.m_nFrequency = 16500;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5438,16 +5438,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_41:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_4;
m_sQueueSample.m_nFrequency = 20000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5458,16 +5458,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_PUNCH_FROM_BEHIND_42:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_5;
m_sQueueSample.m_nFrequency = 18000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5478,16 +5478,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_KNEE_OR_KICK_43:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_5;
m_sQueueSample.m_nFrequency = 16500;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5498,16 +5498,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_FIGHT_KICK_44:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_5;
m_sQueueSample.m_nFrequency = 20000;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound;
- processed = 1;
+ stereo = 1;
++iSound;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5518,15 +5518,15 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 26 + 100;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case SOUND_WEAPON_BAT_ATTACK:
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 0.0f;
@@ -5537,10 +5537,10 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 20 + 100;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
@@ -5549,9 +5549,9 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
switch(weapon->m_eWeaponType) {
case WEAPONTYPE_COLT45:
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5564,18 +5564,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[1] % 10 + 90;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
case WEAPONTYPE_UZI:
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5588,14 +5588,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[3] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
break;
case WEAPONTYPE_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5608,18 +5608,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[2] % 10 + 100;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
case WEAPONTYPE_AK47:
m_sQueueSample.m_nSampleIndex = SFX_AK47_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5632,14 +5632,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[1] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
break;
case WEAPONTYPE_M16:
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5652,14 +5652,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[4] % 15 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
break;
case WEAPONTYPE_SNIPERRIFLE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5672,18 +5672,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 110;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
case WEAPONTYPE_ROCKETLAUNCHER:
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
@@ -5696,16 +5696,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[0] % 20 + 80;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
case WEAPONTYPE_FLAMETHROWER:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = 9;
emittingVol = 90;
m_sQueueSample.m_nFrequency =
@@ -5721,11 +5721,11 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_bEmittingVolume = 90;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 6;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
@@ -5740,12 +5740,12 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nSampleIndex = SFX_PISTOL_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_PISTOL_RELOAD) +
RandomDisplacement(300);
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5754,18 +5754,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_UZI:
m_sQueueSample.m_nSampleIndex = SFX_M16_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = 39243;
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5774,18 +5774,18 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_AK47_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = 30290;
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5794,19 +5794,19 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_AK47:
m_sQueueSample.m_nSampleIndex = SFX_AK47_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_AK47_RELOAD);
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5815,19 +5815,19 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_M16:
m_sQueueSample.m_nSampleIndex = SFX_M16_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_M16_RELOAD);
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5836,19 +5836,19 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_SNIPERRIFLE:
m_sQueueSample.m_nSampleIndex = SFX_RIFLE_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_RIFLE_RELOAD);
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5857,19 +5857,19 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
case WEAPONTYPE_ROCKETLAUNCHER:
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_RELOAD;
emittingVol = 75;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_RELOAD);
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 5;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5878,9 +5878,9 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = 75;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
default: continue;
}
@@ -5889,9 +5889,9 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
case SOUND_WEAPON_UZI_BULLET_ECHO:
case SOUND_WEAPON_M16_BULLET_ECHO:
m_sQueueSample.m_nSampleIndex = SFX_UZI_END_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_END_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.field_16 = 3;
@@ -5903,16 +5903,16 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = m_anRandomTable[4] % 10 + 40;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
if(m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
else
noReflection = 1;
break;
case SOUND_WEAPON_FLAMETHROWER_FIRE:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_START_LEFT;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_FLAMETHROWER_START_LEFT);
@@ -5926,14 +5926,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_nLoopEnd = -1;
emittingVol = 70;
m_sQueueSample.m_bEmittingVolume = 70;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
break;
case SOUND_WEAPON_HIT_PED:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
m_sQueueSample.field_16 = 7;
@@ -5945,14 +5945,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[0] % 20 + 90;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
break;
case SOUND_SPLASH:
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_counter = iSound++;
- processed = 1;
+ stereo = 1;
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
m_sQueueSample.field_16 = 1;
m_sQueueSample.field_48 = 0.0f;
@@ -5963,15 +5963,15 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
emittingVol = m_anRandomTable[2] % 30 + 70;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bRequireReflection = true;
break;
default:
SetupPedComments(params, sound);
continue;
- if(processed && iSound > 60) iSound = 21;
+ if(stereo && iSound > 60) iSound = 21;
if(params->m_fDistance < maxDist) {
CalculateDistance((bool *)params, params->m_fDistance);
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity,
@@ -5982,11 +5982,11 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
m_sQueueSample.m_fDistance) {
noReflection = 0;
} else {
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.m_bOffset = 0;
}
}
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
AddSampleToRequestedQueue();
if(noReflection) {
m_sQueueSample.m_bOffset = 127;
@@ -6347,12 +6347,12 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
m_sQueueSample.m_bVolume =
ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -6360,8 +6360,8 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
params.m_bDistanceCalculated = 1;
params.m_fDistance = distSquared;
@@ -6387,7 +6387,7 @@ cAudioManager::ProcessPornCinema(uint8 sound)
case SCRIPT_SOUND_PORN_CINEMA_1_S:
case SCRIPT_SOUND_MISTY_SEX_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 400.f;
sample = SFX_PORN_1_GROAN_1;
m_sQueueSample.m_fSoundIntensity = 20.0f;
@@ -6395,35 +6395,35 @@ cAudioManager::ProcessPornCinema(uint8 sound)
case SCRIPT_SOUND_PORN_CINEMA_1_L:
case SCRIPT_SOUND_MISTY_SEX_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 6400.f;
sample = SFX_PORN_1_GROAN_1;
m_sQueueSample.m_fSoundIntensity = 80.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 400.f;
sample = SFX_PORN_2_GROAN_1;
m_sQueueSample.m_fSoundIntensity = 20.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 6400.f;
sample = SFX_PORN_2_GROAN_1;
m_sQueueSample.m_fSoundIntensity = 80.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_3_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_3_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 400.f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
sample = SFX_PORN_3_GROAN_1;
break;
case SCRIPT_SOUND_PORN_CINEMA_3_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_3_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
maxDist = 6400.f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
sample = SFX_PORN_3_GROAN_1;
@@ -6440,7 +6440,7 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 3;
@@ -6450,8 +6450,8 @@ cAudioManager::ProcessPornCinema(uint8 sound)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -6467,15 +6467,15 @@ cAudioManager::ProcessPornCinema(uint8 sound)
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.m_counter = rand + 1;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 6;
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gPornNextTime = time + 2000 + m_anRandomTable[3] % 6000;
}
@@ -6497,7 +6497,7 @@ cAudioManager::ProcessProjectiles()
maxDist = 8100.f;
m_sQueueSample.m_fSoundIntensity = 90.0;
m_sQueueSample.m_nSampleIndex = 81;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_FLY);
m_sQueueSample.field_16 = 3;
@@ -6507,7 +6507,7 @@ cAudioManager::ProcessProjectiles()
maxDist = 900.f;
m_sQueueSample.m_fSoundIntensity = 30.0;
m_sQueueSample.m_nSampleIndex = SFX_PED_ON_FIRE;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
32 * SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE) / 25;
m_sQueueSample.field_16 = 7;
@@ -6524,7 +6524,7 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
@@ -6532,8 +6532,8 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.field_56 = 0;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -6562,8 +6562,8 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams *params)
if(veh->m_bRainSamplesCounter > 4) veh->m_bRainSamplesCounter = 68;
m_sQueueSample.m_nSampleIndex =
(m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
@@ -6573,8 +6573,8 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams *params)
m_sQueueSample.field_48 = 0.0f;
m_sQueueSample.m_fSoundIntensity = 22.0f;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -6599,7 +6599,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
int32 emittingVol;
float modificator;
- if(params->m_fDistance >= 900.f) return 0;
+ if(params->m_fDistance >= 900.f) return false;
veh = params->m_pVehicle;
if(veh->bEngineOn && (veh->m_fGasPedal < 0.0f || !veh->m_nCurrentGear)) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -6622,8 +6622,8 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
m_sQueueSample.m_counter = 61;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR;
}
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
m_sQueueSample.m_nFrequency = (6000.f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
@@ -6635,12 +6635,12 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
- return 1;
+ return true;
}
void
@@ -6665,10 +6665,10 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SAWMILL_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 5;
@@ -6677,8 +6677,8 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
@@ -6687,19 +6687,19 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
ComputeVolume(70, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_CUT_WOOD;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = 1;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gSawMillNextTime = time + 2000 + m_anRandomTable[3] % 4000;
}
@@ -6743,10 +6743,10 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_SHOP_LOOP;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOP_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 5;
@@ -6755,8 +6755,8 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
@@ -6766,11 +6766,11 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
if(m_sQueueSample.m_bVolume) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + SFX_SHOP_TILL_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = rand + 1;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.field_16 = 3;
@@ -6778,8 +6778,8 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_bEmittingVolume = 70;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
gShopNextTime = time + 3000 + m_anRandomTable[3] % 7000;
}
@@ -6817,7 +6817,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
uint8 emittingVol;
float speedMultipler;
- if(params->m_fDistance >= 90000.f) return 0;
+ if(params->m_fDistance >= 90000.f) return false;
if(params->m_fVelocityChange > 0.0f) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -6829,8 +6829,8 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 2;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR);
@@ -6844,8 +6844,8 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 300.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -6854,8 +6854,8 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 33;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 5;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) +
@@ -6868,13 +6868,13 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 70.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
}
- return 1;
+ return true;
}
void
@@ -6975,7 +6975,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
int32 emittingVol;
float velocity;
- if(params->m_fDistance >= 1600.f) return 0;
+ if(params->m_fDistance >= 1600.f) return false;
automobile = (CAutomobile *)params->m_pVehicle;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -6995,8 +6995,8 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex) +
RandomDisplacement(1000);
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -7005,15 +7005,15 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
m_sQueueSample.field_48 = 1.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
m_sQueueSample.field_56 = 1;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 1;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = true;
AddSampleToRequestedQueue();
}
}
}
}
}
- return 1;
+ return true;
}
WRAPPER
@@ -7040,8 +7040,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
m_sQueueSample.m_counter = 4;
m_sQueueSample.m_nSampleIndex =
CarSounds[params->m_nIndex].m_nHornSample;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 2;
m_sQueueSample.m_nFrequency =
CarSounds[params->m_nIndex].m_nHornFrequency;
@@ -7055,8 +7055,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 40.0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
return;
@@ -7072,8 +7072,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
m_sQueueSample.m_counter = 4;
m_sQueueSample.m_nSampleIndex =
CarSounds[params->m_nIndex].m_nHornSample;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 2;
m_sQueueSample.m_nFrequency =
CarSounds[params->m_nIndex].m_nHornFrequency;
@@ -7087,8 +7087,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 40.0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -7109,7 +7109,7 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams *params)
{
CVehicle *veh = params->m_pVehicle;
- if(params->m_fDistance >= 2500.f) return 0;
+ if(params->m_fDistance >= 2500.f) return false;
if(veh->bEngineOn && veh->m_fGasPedal < 0.0f) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -7117,8 +7117,8 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 12;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 2;
m_sQueueSample.m_nFrequency =
(100 * m_sQueueSample.m_nEntityIndex & 1023) +
@@ -7132,12 +7132,12 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
- return 1;
+ return true;
}
bool
@@ -7149,7 +7149,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams *params)
int sampleFreq;
float velocity;
- if(params->m_fDistance >= 9025.f) return 0;
+ if(params->m_fDistance >= 9025.f) return false;
if(params->m_pTransmission) {
if(params->m_pVehicle->m_vecMoveSpeed.z) {
velocity = Abs(params->m_fVelocityChange);
@@ -7160,8 +7160,8 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams *params)
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 95.f, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
if(params->m_pVehicle->m_nSurfaceTouched == SURFACE_PUDDLE) {
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
@@ -7184,14 +7184,14 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 95.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 4;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
}
}
- return 1;
+ return true;
}
void
@@ -7225,8 +7225,8 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = CarSounds[params->m_nIndex].m_nSirenOrAlarmSample;
m_sQueueSample.m_nFrequency = CarSounds[params->m_nIndex].m_nSirenOrAlarmFrequency;
}
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 80;
@@ -7237,8 +7237,8 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 110.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 5;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
return;
}
@@ -7321,8 +7321,8 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
break;
}
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 8;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
@@ -7333,8 +7333,8 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 40.0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -7353,13 +7353,13 @@ void cAudioManager::ProcessWaterCannon(int32)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_fSoundIntensity = 900.0f;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.field_16 = 5;
m_sQueueSample.m_counter = i;
m_sQueueSample.field_48 = 2.0f;
m_sQueueSample.field_76 = 8;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.m_bEmittingVolume = 50;
@@ -7367,8 +7367,8 @@ void cAudioManager::ProcessWaterCannon(int32)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -7385,12 +7385,12 @@ cAudioManager::ProcessWeather(int32 id)
if(m_asAudioEntities[id].m_AudioEvents && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
if(m_asAudioEntities[id].m_afVolume[0] >= 10.f) {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
vol = (m_asAudioEntities[id].m_afVolume[0] - 10.f) + 40;
} else {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
vol = (m_asAudioEntities[id].m_afVolume[0]) + 35;
}
@@ -7400,14 +7400,14 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_counter = counter++;
m_sQueueSample.field_16 = 0;
m_sQueueSample.m_bOffset = (m_anRandomTable[2] & 15) + 55;
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.field_56 = 1;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = 0;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
if(CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
@@ -7416,18 +7416,18 @@ cAudioManager::ProcessWeather(int32 id)
SampleManager.GetSampleBaseFrequency(SFX_RAIN);
m_sQueueSample.m_bVolume = (uint8)(25.f * CWeather::Rain);
m_sQueueSample.m_counter = 4;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.field_16 = 0;
m_sQueueSample.m_bOffset = 63;
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 30;
- m_sQueueSample.m_bReverbFlag = 0;
+ m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -7441,7 +7441,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams *params)
int freq;
float velChange;
- if(params->m_fDistance >= 900.f) return 0;
+ if(params->m_fDistance >= 900.f) return false;
if(params->m_pTransmission) {
if(params->m_pVehicle->m_vecMoveSpeed.z) {
velChange = Abs(params->m_fVelocityChange);
@@ -7454,8 +7454,8 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 3;
modificator = m_sQueueSample.m_fDistance * 1.f / 3.f * 0.5f;
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
@@ -7470,14 +7470,14 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams *params)
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 4;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
}
}
- return 1;
+ return true;
}
void
@@ -7501,10 +7501,10 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_WORKSHOP_1;
- m_sQueueSample.m_bBankIndex = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_WORKSHOP_1);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_16 = 5;
@@ -7513,8 +7513,8 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
}
@@ -7745,15 +7745,15 @@ bool cAudioManager::SetupJumboEngineSound(uint8, int32) { EAXJMP(0x56F140); }
bool
cAudioManager::SetupJumboFlySound(uint8 emittingVol)
{
- if(m_sQueueSample.m_fDistance >= 440.0f) return 0;
+ if(m_sQueueSample.m_fDistance >= 440.0f) return false;
int32 vol = ComputeVolume(emittingVol, 440.0f, m_sQueueSample.m_fDistance);
m_sQueueSample.m_bVolume = vol;
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopCount = 0;
@@ -7762,26 +7762,26 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_fSoundIntensity = 440.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_48 = 4.0f;
- m_sQueueSample.m_bReverbFlag = 1;
+ m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.field_76 = 5;
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
bool
cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
{
- if(m_sQueueSample.m_fDistance >= 240.f) return 0;
+ if(m_sQueueSample.m_fDistance >= 240.f) return false;
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 240.f, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 5;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
@@ -7793,8 +7793,8 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 12;
m_sQueueSample.m_bOffset = 0;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
m_sQueueSample.m_counter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
@@ -7802,13 +7802,13 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_bOffset = maxVolume;
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
bool
cAudioManager::SetupJumboTaxiSound(uint8 vol)
{
- if(m_sQueueSample.m_fDistance >= 180.f) return 0;
+ if(m_sQueueSample.m_fDistance >= 180.f) return false;
uint8 emittingVol = (vol >> 1) + ((vol >> 1) * m_sQueueSample.m_fDistance / 180);
@@ -7818,8 +7818,8 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
@@ -7830,25 +7830,25 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_fSoundIntensity = 180.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 4;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
bool
cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
{
- if(m_sQueueSample.m_fDistance >= 170.f) return 0;
+ if(m_sQueueSample.m_fDistance >= 170.f) return false;
m_sQueueSample.m_bVolume = ComputeVolume(emittingVol, 170.f, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = false;
m_sQueueSample.field_16 = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
@@ -7859,11 +7859,11 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
m_sQueueSample.m_fSoundIntensity = 170.0f;
m_sQueueSample.field_56 = 0;
m_sQueueSample.field_76 = 4;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
- return 1;
+ return true;
}
void
@@ -8141,7 +8141,7 @@ cAudioManager::AdjustSamplesVolume()
for(int i = 0; i < m_bSampleRequestQueuesStatus[m_bActiveSampleQueue]; i++) {
tSound* pSample = &m_asSamples[m_bActiveSampleQueue][m_abSampleQueueIndexTable[m_bActiveSampleQueue][i] + 1];
- if(!pSample->m_bBankIndex) // all non-speech sounds on PC
+ if(!pSample->m_bIsDistant)
pSample->m_bEmittingVolume = ComputeEmittingVolume(
pSample->m_bEmittingVolume, pSample->m_fSoundIntensity, pSample->m_fDistance);
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index dff1948f..bd34c800 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -140,7 +140,7 @@ public:
int32 m_counter;
int32 m_nSampleIndex;
uint8 m_bBankIndex;
- uint8 m_bIsDistant;
+ bool m_bIsDistant;
uint8 field_14;
uint8 field_15;
int32 field_16;
@@ -164,9 +164,9 @@ public:
uint8 field_58;
uint8 field_59;
CVector m_vecPos;
- uint8 m_bReverbFlag;
+ bool m_bReverbFlag;
uint8 m_bLoopsRemaining;
- uint8 m_bRequireReflection;
+ bool m_bRequireReflection;
uint8 m_bOffset;
int32 field_76;
uint8 m_bIsProcessed;
@@ -337,6 +337,7 @@ public:
uint32 GetFrameCounter() const { return m_nTimeOfRecentCrime; }
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
+ bool IsMissionAudioPlaying() const { return m_sMissionAudio.m_bPlayStatus == 1; }
// "Should" be in alphabetic order, except "getXTalkSfx"
void AddDetailsToRequestedOrderList(uint8 sample); /// ok (check once more)
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 25b20179..a01c85ae 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -301,7 +301,7 @@ cDMAudio::ClearMissionAudio(void)
AudioManager.ClearMissionAudio();
}
-int32
+uint8
cDMAudio::GetRadioInCar(void)
{
return MusicManager.GetRadioInCar();
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index a6910b58..125263f0 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -253,7 +253,7 @@ public:
bool IsMissionAudioSampleFinished(void);
void ClearMissionAudio(void);
- int32 GetRadioInCar(void);
+ uint8 GetRadioInCar(void);
void SetRadioInCar(uint32 radio);
void SetRadioChannel(int8 radio, int32 pos);
};
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 1d059a46..5b94514b 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -1,5 +1,8 @@
#include "common.h"
+#include <time.h>
#include "MusicManager.h"
+#include "AudioManager.h"
+#include "ControllerConfig.h"
#include "Camera.h"
#include "Font.h"
#include "Hud.h"
@@ -15,35 +18,51 @@ cMusicManager &MusicManager = *(cMusicManager *)0x8F3964;
int32 &gNumRetunePresses = *(int32 *)0x650B80;
wchar *pCurrentStation = (wchar *)0x650B9C;
uint8 &cDisplay = *(uint8 *)0x650BA1;
+int32 &gRetuneCounter = *(int32*)0x650B84;
+bool& bHasStarted = *(bool*)0x650B7C;
+
+cMusicManager::cMusicManager()
+{
+ m_bIsInitialised = false;
+ m_bDisabled = false;
+ m_nMusicMode = MUSICMODE_DISABLED;
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ m_bFrontendTrackFinished = false;
+ m_bPlayInFrontend = false;
+ m_bSetNextStation = false;
+ m_nAnnouncement = NO_STREAMED_SOUND;
+ m_bPreviousPlayerInCar = false;
+ m_bPlayerInCar = false;
+ m_bAnnouncementInProgress = false;
+ m_bDontServiceAmbienceTrack = false;
+ bHasStarted = false;
+}
bool
cMusicManager::PlayerInCar()
{
if(!FindPlayerVehicle())
return false;
- else {
- int32 State = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_nPedState;
- if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
- return false;
+ int32 State = FindPlayerPed()->m_nPedState;
- switch(FindPlayerVehicle()->m_modelIndex) {
- case MI_FIRETRUCK:
- case MI_AMBULAN:
- case MI_MRWHOOP:
- case MI_PREDATOR:
- case MI_TRAIN:
- case MI_SPEEDER:
- case MI_REEFER:
- case MI_GHOST: return false;
- default: return true;
- }
+ if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
+ return false;
+
+ switch(FindPlayerVehicle()->m_modelIndex) {
+ case MI_FIRETRUCK:
+ case MI_AMBULAN:
+ case MI_MRWHOOP:
+ case MI_PREDATOR:
+ case MI_TRAIN:
+ case MI_SPEEDER:
+ case MI_REEFER:
+ case MI_GHOST: return false;
+ default: return true;
}
}
-#if 0
-WRAPPER void cMusicManager::DisplayRadioStationName(void) { EAXJMP(0x57E6D0); }
-#else
void
cMusicManager::DisplayRadioStationName()
{
@@ -51,13 +70,13 @@ cMusicManager::DisplayRadioStationName()
int8 gStreamedSound;
int8 gRetuneCounter;
- if(!CTimer::GetIsPaused() && !TheCamera.m_WideScreenOn && cMusicManager::PlayerInCar() &&
+ if(!CTimer::GetIsPaused() && !TheCamera.m_WideScreenOn && PlayerInCar() &&
!CReplay::IsPlayingBack()) {
- if(MusicManager.m_bPlayerInCar && !MusicManager.m_bPreviousPlayerInCar)
+ if(m_bPlayerInCar && !m_bPreviousPlayerInCar)
pCurrentStation = nil;
if(SampleManager.IsMP3RadioChannelAvailable()) {
- gStreamedSound = MusicManager.m_nCurrentStreamedSound;
+ gStreamedSound = m_nCurrentStreamedSound;
if(gStreamedSound == STREAMED_SOUND_CITY_AMBIENT ||
gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) {
@@ -74,15 +93,15 @@ cMusicManager::DisplayRadioStationName()
if(pRetune == POLICE_RADIO) {
pRetune = RADIO_OFF;
} else if(pRetune > POLICE_RADIO) {
- pRetune = pRetune - 11;
+ pRetune = pRetune - RADIO_OFF;
}
} else {
- gStreamedSound = MusicManager.m_nCurrentStreamedSound;
+ gStreamedSound = m_nCurrentStreamedSound;
pRetune = gNumRetunePresses + gStreamedSound;
if(pRetune >= USERTRACK) {
gRetuneCounter = gNumRetunePresses;
- pRetune = MusicManager.m_nCurrentStreamedSound;
+ pRetune = m_nCurrentStreamedSound;
if(gStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
pRetune = RADIO_OFF;
@@ -119,13 +138,13 @@ cMusicManager::DisplayRadioStationName()
if(pRetune > CHATTERBOX && !SampleManager.IsMP3RadioChannelAvailable()) { return; }
if(string && pCurrentStation != string ||
- MusicManager.m_nCurrentStreamedSound == STREAMED_SOUND_RADIO_MP3_PLAYER &&
- MusicManager.m_nPreviousStreamedSound != STREAMED_SOUND_RADIO_MP3_PLAYER) {
+ m_nCurrentStreamedSound == STREAMED_SOUND_RADIO_MP3_PLAYER &&
+ m_nPreviousStreamedSound != STREAMED_SOUND_RADIO_MP3_PLAYER) {
pCurrentStation = string;
cDisplay = 60;
} else {
- if(!cDisplay) return;
- --cDisplay;
+ if(cDisplay == 0) return;
+ cDisplay--;
}
CFont::SetJustifyOff();
@@ -147,97 +166,769 @@ cMusicManager::DisplayRadioStationName()
CFont::DrawFonts();
}
}
-#endif
-WRAPPER
-void
+bool
cMusicManager::Initialise()
{
- EAXJMP(0x57CF70);
+ int pos;
+
+ if (!IsInitialised()) {
+ time_t timevalue = time(0);
+ if (timevalue == -1) {
+ pos = AudioManager.GetRandomNumber(0);
+ } else {
+ tm *pTm = localtime(&timevalue);
+ if (pTm->tm_sec == 0)
+ pTm->tm_sec = AudioManager.GetRandomNumber(0);
+ if (pTm->tm_min == 0)
+ pTm->tm_min = AudioManager.GetRandomNumber(1);
+ if (pTm->tm_hour == 0)
+ pTm->tm_hour = AudioManager.GetRandomNumber(2);
+ if (pTm->tm_mday == 0)
+ pTm->tm_mday = AudioManager.GetRandomNumber(3);
+ if (pTm->tm_mon == 0)
+ pTm->tm_mon = AudioManager.GetRandomNumber(4);
+ if (pTm->tm_year == 0)
+ pTm->tm_year = AudioManager.GetRandomNumber(3);
+ if (pTm->tm_wday == 0)
+ pTm->tm_wday = AudioManager.GetRandomNumber(2);
+ pos = pTm->tm_yday
+ * pTm->tm_wday
+ * pTm->tm_year
+ * pTm->tm_mon
+ * pTm->tm_mday
+ * pTm->tm_hour * pTm->tm_hour
+ * pTm->tm_min * pTm->tm_min
+ * pTm->tm_sec * pTm->tm_sec * pTm->tm_sec * pTm->tm_sec;
+ }
+
+ for (int i = 0; i < TOTAL_STREAMED_SOUNDS; i++) {
+ m_aTracks[i].m_nLength = SampleManager.GetStreamedFileLength(i);
+ m_aTracks[i].m_nPosition = pos * AudioManager.GetRandomNumber(i % 5) % m_aTracks[i].m_nLength;
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+
+ m_bResetTimers = false;
+ m_nResetTime = 0;
+ m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
+ m_bDoTrackService = false;
+ m_bIgnoreTimeDelay = false;
+ m_bRadioSetByScript = false;
+ m_nRadioStation = HEAD_RADIO;
+ m_nRadioPosition = -1;
+ m_nRadioInCar = NO_STREAMED_SOUND;
+ gNumRetunePresses = 0;
+ gRetuneCounter = 0;
+ m_bIsInitialised = true;
+ }
+ return m_bIsInitialised;
}
-WRAPPER
void
cMusicManager::Terminate()
{
- EAXJMP(0x57D140);
+ if (!IsInitialised()) return;
+
+ if (SampleManager.IsStreamPlaying(0)) {
+ SampleManager.StopStreamedFile(0);
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ }
+ m_bIsInitialised = false;
+}
+
+void
+cMusicManager::ChangeMusicMode(uint8 mode)
+{
+ if (!IsInitialised()) return;
+
+ uint8 mode2;
+ switch (mode)
+ {
+ case MUSICMODE_FRONTEND: mode2 = MUSICMODE_FRONTEND; break;
+ case MUSICMODE_GAME: mode2 = MUSICMODE_GAME; break;
+ case MUSICMODE_CUTSCENE: mode2 = MUSICMODE_CUTSCENE; break;
+ case MUSICMODE_DISABLE: mode2 = MUSICMODE_DISABLED; break;
+ default: return;
+ }
+
+ if (mode2 != m_nMusicMode || mode == MUSICMODE_FRONTEND && mode2 == MUSICMODE_FRONTEND) {
+ switch (mode)
+ {
+ case MUSICMODE_FRONTEND:
+ case MUSICMODE_GAME:
+ case MUSICMODE_CUTSCENE:
+ case MUSICMODE_DISABLED:
+ if (SampleManager.IsStreamPlaying(0)) {
+ if (m_nCurrentStreamedSound < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ SampleManager.StopStreamedFile(0);
+ }
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ m_bFrontendTrackFinished = false;
+ m_bPlayInFrontend = false;
+ m_bSetNextStation = false;
+ m_bPreviousPlayerInCar = false;
+ m_bPlayerInCar = false;
+ m_bAnnouncementInProgress = false;
+ m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
+ m_bDoTrackService = false;
+ m_bIgnoreTimeDelay = true;
+ m_bDontServiceAmbienceTrack = false;
+ m_nMusicMode = mode2;
+ break;
+ default: return;
+ }
+ }
+}
+
+uint8
+cMusicManager::GetRadioInCar(void)
+{
+ if (!m_bIsInitialised) return HEAD_RADIO;
+ if (PlayerInCar()) {
+ CVehicle *veh = FindPlayerVehicle();
+ if (veh != nil){
+ if (UsesPoliceRadio(veh)) {
+ if (m_nRadioInCar == NO_STREAMED_SOUND || CReplay::IsPlayingBack() && AudioManager.m_bUserPause)
+ return POLICE_RADIO;
+ return m_nRadioInCar;
+ } else return veh->m_nRadioStation;
+ }
+ }
+
+ if (m_nRadioInCar == NO_STREAMED_SOUND || CReplay::IsPlayingBack() && AudioManager.m_bUserPause)
+ return RADIO_OFF;
+ return m_nRadioInCar;
}
-WRAPPER
void
-cMusicManager::ChangeMusicMode(int32 mode)
+cMusicManager::SetRadioInCar(uint32 station)
{
- EAXJMP(0x57D310);
+ if (m_bIsInitialised) {
+ if (!PlayerInCar()) {
+ m_nRadioInCar = station;
+ return;
+ }
+ CVehicle *veh = FindPlayerVehicle();
+ if (veh == nil) return;
+ if (UsesPoliceRadio(veh))
+ m_nRadioInCar = station;
+ else
+ veh->m_nRadioStation = station;
+ }
+}
+
+void
+cMusicManager::SetRadioChannelByScript(uint8 station, int32 pos)
+{
+ if (m_bIsInitialised && station < RADIO_OFF) {
+ m_bRadioSetByScript = true;
+ m_nRadioStation = station;
+ m_nRadioPosition = pos == -1 ? -1 : pos % m_aTracks[station].m_nLength;
+ }
+}
+
+
+void
+cMusicManager::ResetMusicAfterReload()
+{
+ m_bRadioSetByScript = false;
+ m_nRadioStation = 0;
+ m_nRadioPosition = -1;
+ m_nAnnouncement = NO_STREAMED_SOUND;
+ m_bAnnouncementInProgress = false;
+ m_bSetNextStation = false;
+ gRetuneCounter = 0;
+ gNumRetunePresses = 0;
+}
+
+
+void
+cMusicManager::ResetTimers(int32 time)
+{
+ m_bResetTimers = true;
+ m_nResetTime = time;
+}
+
+void
+cMusicManager::Service()
+{
+ if (m_bResetTimers) {
+ m_bResetTimers = false;
+ m_nLastTrackServiceTime = m_nResetTime;
+ }
+
+ if (!m_bIsInitialised || m_bDisabled) return;
+
+ if (m_nMusicMode == MUSICMODE_CUTSCENE) {
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0);
+ return;
+ }
+
+ m_nTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ if (m_nTimer > (m_nLastTrackServiceTime + 2000) || m_bIgnoreTimeDelay) {
+ m_bIgnoreTimeDelay = false;
+ m_bDoTrackService = true;
+ m_nLastTrackServiceTime = m_nTimer;
+ } else m_bDoTrackService = false;
+
+ if (m_nCurrentStreamedSound == NO_STREAMED_SOUND && SampleManager.IsStreamPlaying(0))
+ SampleManager.StopStreamedFile(0);
+ else switch (m_nMusicMode) {
+ case MUSICMODE_FRONTEND: ServiceFrontEndMode(); break;
+ case MUSICMODE_GAME: ServiceGameMode(); break;
+ }
+}
+
+void
+cMusicManager::ServiceFrontEndMode()
+{
+ if (m_nCurrentStreamedSound < TOTAL_STREAMED_SOUNDS) {
+ if (m_bFrontendTrackFinished) {
+ if (!SampleManager.IsStreamPlaying(0)) {
+ switch (m_nCurrentStreamedSound)
+ {
+ case STREAMED_SOUND_MISSION_COMPLETED:
+ if (!AudioManager.m_bUserPause)
+ ChangeMusicMode(MUSICMODE_GAME);
+ break;
+ case STREAMED_SOUND_GAME_COMPLETED:
+ ChangeMusicMode(MUSICMODE_GAME);
+ break;
+ default:
+ break;
+ }
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ }
+ } else if (bHasStarted) {
+ if (!SampleManager.IsStreamPlaying(0))
+ SampleManager.StartStreamedFile(m_nCurrentStreamedSound, 0, 0);
+ } else {
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ if (!SampleManager.StartStreamedFile(m_nCurrentStreamedSound, m_nCurrentStreamedSound < STREAMED_SOUND_RADIO_POLICE ? GetTrackStartPos(m_nCurrentStreamedSound) : 0, 0))
+ return;
+ SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
+ if (m_bPlayInFrontend) bHasStarted = true;
+ else m_bFrontendTrackFinished = true;
+ }
+ }
+ if (SampleManager.IsStreamPlaying(0))
+ SampleManager.SetStreamedVolumeAndPan((CPad::GetPad(0)->bDisplayNoControllerMessage || CPad::GetPad(0)->bObsoleteControllerMessage) ? 0 : 100, 63, 0, 0);
+}
+
+void
+cMusicManager::ServiceGameMode()
+{
+ bool bRadioOff = false;
+ static int8 nFramesSinceCutsceneEnded = -1;
+
+ m_bPreviousPlayerInCar = m_bPlayerInCar;
+ m_bPlayerInCar = PlayerInCar();
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ if (m_bPlayerInCar) {
+ if (FindPlayerPed() != nil
+ && !FindPlayerPed()->DyingOrDead()
+ && CPad::GetPad(0)->ChangeStationJustDown()
+ && !CReplay::IsPlayingBack()
+ && FindPlayerVehicle() != nil
+ && !UsesPoliceRadio(FindPlayerVehicle())) {
+ gRetuneCounter = 30;
+ gNumRetunePresses++;
+ AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 1.0f);
+ if (SampleManager.IsMP3RadioChannelAvailable()) {
+ if (gNumRetunePresses > RADIO_OFF)
+ gNumRetunePresses -= RADIO_OFF;
+ }
+ }
+ } else {
+ nFramesSinceCutsceneEnded = -1;
+ }
+
+ if (AudioManager.m_bPreviousUserPause)
+ m_bPreviousPlayerInCar = false;
+ if (!m_bPlayerInCar) {
+ if (m_bPreviousPlayerInCar) {
+ if (m_nCurrentStreamedSound != STREAMED_SOUND_RADIO_POLICE)
+ m_nRadioInCar = m_nCurrentStreamedSound;
+ }
+ ServiceAmbience();
+ return;
+ }
+
+ if (m_bPreviousPlayerInCar) {
+ if (m_nAnnouncement < TOTAL_STREAMED_SOUNDS
+ && (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT || m_bAnnouncementInProgress)
+ && ServiceAnnouncement())
+ {
+ if (m_bAnnouncementInProgress) {
+ m_bSetNextStation = false;
+ return;
+ }
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = GetCarTuning();
+ }
+ if (SampleManager.IsMP3RadioChannelAvailable()
+ && m_nCurrentStreamedSound != STREAMED_SOUND_RADIO_MP3_PLAYER
+ && ControlsManager.GetIsKeyboardKeyJustDown(rsF9))
+ {
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = STREAMED_SOUND_RADIO_MP3_PLAYER;
+ if (FindPlayerVehicle() != nil)
+ FindPlayerVehicle()->m_nRadioStation = STREAMED_SOUND_RADIO_MP3_PLAYER;
+ AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 1.0f);
+ gRetuneCounter = 0;
+ gNumRetunePresses = 0;
+ m_bSetNextStation = false;
+ }
+ if (gNumRetunePresses) {
+ if (gRetuneCounter != 0) gRetuneCounter--;
+ else m_bSetNextStation = true;
+ }
+ if (gRetuneCounter)
+ AudioManager.DoPoliceRadioCrackle();
+ if (m_bSetNextStation) {
+ m_bSetNextStation = false;
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = GetNextCarTuning();
+ if (m_nCurrentStreamedSound == STREAMED_SOUND_CITY_AMBIENT || m_nCurrentStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
+ bRadioOff = true;
+
+ if (m_nPreviousStreamedSound == STREAMED_SOUND_CITY_AMBIENT || m_nPreviousStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
+ AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 0.0f);
+ }
+ if (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT) {
+ if (ChangeRadioChannel()) {
+ ServiceTrack();
+ } else {
+ m_bPlayerInCar = false;
+ if (FindPlayerVehicle())
+ FindPlayerVehicle()->m_nRadioStation = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ }
+ if (CTimer::GetIsSlowMotionActive()) {
+ if (TheCamera.pTargetEntity != nil) {
+ float dist = (TheCamera.pTargetEntity->GetPosition() - TheCamera.GetPosition()).MagnitudeSqr();
+ if (dist >= 3025.0f) {
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ } else if (dist >= 100.0f) {
+ int8 volume = ((45.0f - (Sqrt(dist) - 10.0f)) / 45.0f * 100.0f);
+ int8 pan;
+ if (AudioManager.IsMissionAudioPlaying())
+ volume /= 4;
+ if (volume != 0) {
+ CVector trVec;
+ AudioManager.TranslateEntity(&TheCamera.pTargetEntity->GetPosition(), &trVec);
+ pan = AudioManager.ComputePan(55.0f, &trVec);
+ } else {
+ pan = 0;
+ }
+ if (gRetuneCounter)
+ volume /= 4;
+ SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0);
+ } else if (AudioManager.IsMissionAudioPlaying()) {
+ SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ } else if (gRetuneCounter) {
+ SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ } else {
+ SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
+ }
+ }
+ } else if (AudioManager.IsMissionAudioPlaying()) {
+ SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ nFramesSinceCutsceneEnded = 0;
+ } else {
+ int8 volume;
+ if (nFramesSinceCutsceneEnded == -1) {
+ volume = 100;
+ } else if (nFramesSinceCutsceneEnded >= 20) {
+ if (nFramesSinceCutsceneEnded >= 40) {
+ nFramesSinceCutsceneEnded = -1;
+ volume = 100;
+ } else {
+ volume = 3 * (nFramesSinceCutsceneEnded - 20) + 25;
+ nFramesSinceCutsceneEnded++;
+ }
+ } else {
+ nFramesSinceCutsceneEnded++;
+ volume = 25;
+ }
+ if (gRetuneCounter) volume /= 4;
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, 0, 0);
+ }
+ return;
+ }
+ if (bRadioOff) {
+ m_nCurrentStreamedSound = m_nPreviousStreamedSound;
+ if (FindPlayerVehicle() != nil)
+ FindPlayerVehicle()->m_nRadioStation = RADIO_OFF;
+ AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_NO_RADIO, 0.0f);
+ }
+ ServiceAmbience();
+ return;
+ }
+ if (m_bRadioSetByScript) {
+ if (UsesPoliceRadio(FindPlayerVehicle())) {
+ m_nCurrentStreamedSound = STREAMED_SOUND_RADIO_POLICE;
+ } else {
+ m_nCurrentStreamedSound = m_nRadioStation;
+ if (FindPlayerVehicle()->m_nRadioStation == m_nCurrentStreamedSound) {
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.StopStreamedFile(0);
+ }
+ if (m_nRadioPosition != -1) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = m_nRadioPosition;
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ }
+ } else {
+ m_nCurrentStreamedSound = GetCarTuning();
+ }
+ if (m_nCurrentStreamedSound >= RADIO_OFF) {
+ ServiceAmbience();
+ return;
+ }
+ if (ChangeRadioChannel()) {
+ if (m_bRadioSetByScript) {
+ m_bRadioSetByScript = false;
+ FindPlayerVehicle()->m_nRadioStation = m_nCurrentStreamedSound;
+ }
+ } else {
+ m_bPlayerInCar = false;
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ }
}
-WRAPPER
void
cMusicManager::StopFrontEndTrack()
{
- EAXJMP(0x57E3D0);
+ if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_FRONTEND && m_nCurrentStreamedSound != NO_STREAMED_SOUND) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile(0);
+ m_nPreviousStreamedSound = NO_STREAMED_SOUND;
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ }
}
-WRAPPER void
-cMusicManager::PlayAnnouncement(uint8)
+void
+cMusicManager::PlayAnnouncement(uint8 announcement)
{
- EAXJMP(0x57E430);
+ if (IsInitialised() && !m_bDisabled && !m_bAnnouncementInProgress)
+ m_nAnnouncement = announcement;
}
-WRAPPER void
-cMusicManager::PlayFrontEndTrack(uint8, uint8)
+void
+cMusicManager::PlayFrontEndTrack(uint8 track, uint8 bPlayInFrontend)
{
- EAXJMP(0x57E2E0);
+ if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS) {
+ if (m_nMusicMode == MUSICMODE_GAME) {
+ if (m_nCurrentStreamedSound != NO_STREAMED_SOUND) {
+ if (m_bAnnouncementInProgress) {
+ m_nAnnouncement = NO_STREAMED_SOUND;
+ m_bAnnouncementInProgress = false;
+ }
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ SampleManager.StopStreamedFile(0);
+ } else if (m_nMusicMode == MUSICMODE_FRONTEND) {
+ if (m_nCurrentStreamedSound != NO_STREAMED_SOUND) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ SampleManager.StopStreamedFile(0);
+ }
+
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = track;
+ m_bPlayInFrontend = !!bPlayInFrontend;
+ m_bFrontendTrackFinished = false;
+ m_bDoTrackService = true;
+ bHasStarted = false;
+ if (m_nCurrentStreamedSound < STREAMED_SOUND_RADIO_POLICE) {
+ gRetuneCounter = 0;
+ gNumRetunePresses = 0;
+ }
+ }
}
-WRAPPER void
-cMusicManager::PreloadCutSceneMusic(uint8)
+void
+cMusicManager::PreloadCutSceneMusic(uint8 track)
{
- EAXJMP(0x57E210);
+ if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS && m_nMusicMode == MUSICMODE_CUTSCENE) {
+ AudioManager.ResetPoliceRadio();
+ while (SampleManager.IsStreamPlaying(0))
+ SampleManager.StopStreamedFile(0);
+ SampleManager.PreloadStreamedFile(track, 0);
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0);
+ m_nCurrentStreamedSound = track;
+ }
}
-WRAPPER void
+void
cMusicManager::PlayPreloadedCutSceneMusic(void)
{
- EAXJMP(0x57E290);
+ if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE)
+ SampleManager.StartPreloadedStreamedFile(0);
}
-WRAPPER void
+void
cMusicManager::StopCutSceneMusic(void)
{
- EAXJMP(0x57E2B0);
+ if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE) {
+ SampleManager.StopStreamedFile(0);
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ }
}
-WRAPPER int32
-cMusicManager::GetRadioInCar(void)
+uint32
+cMusicManager::GetTrackStartPos(uint8 track)
{
- EAXJMP(0x57D1D0);
+ uint32 result;
+ uint32 timer = m_aTracks[track].m_nLastPosCheckTimer;
+ if (CTimer::GetTimeInMillisecondsPauseMode() <= timer) {
+ result = m_aTracks[track].m_nPosition;
+ m_aTracks[track].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ } else
+ result = min(CTimer::GetTimeInMillisecondsPauseMode() - timer, 90000) + m_aTracks[track].m_nPosition;
+
+ if (result > m_aTracks[track].m_nLength) result %= m_aTracks[track].m_nLength;
+ return result;
}
-WRAPPER void
-cMusicManager::SetRadioInCar(uint32)
+
+bool
+cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
- EAXJMP(0x57D2C0);
+ switch (veh->GetModelIndex())
+ {
+ case MI_FBICAR:
+ case MI_POLICE:
+ case MI_ENFORCER:
+ case MI_PREDATOR:
+ case MI_RHINO:
+ case MI_BARRACKS:
+ return true;
+ }
+ return false;
}
-WRAPPER void
-cMusicManager::SetRadioChannelByScript(uint8, int32)
+void
+cMusicManager::ServiceAmbience()
{
- EAXJMP(0x57D180);
+ uint8 volume;
+
+ if (m_bAnnouncementInProgress) {
+ m_nAnnouncement = NO_STREAMED_SOUND;
+ m_bAnnouncementInProgress = false;
+ }
+ if (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT) {
+ if (SampleManager.IsStreamPlaying(0)) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile(0);
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ return;
+ }
+ m_nCurrentStreamedSound = STREAMED_SOUND_CITY_AMBIENT;
+ }
+ if (CWorld::Players[CWorld::PlayerInFocus].m_WBState != WBSTATE_PLAYING && !SampleManager.IsStreamPlaying(0)) {
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ return;
+ }
+
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = TheCamera.DistanceToWater <= 45.0f ? STREAMED_SOUND_WATER_AMBIENT : STREAMED_SOUND_CITY_AMBIENT;
+
+ if (m_nCurrentStreamedSound == m_nPreviousStreamedSound) {
+ ComputeAmbienceVol(false, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
+ if (m_bDontServiceAmbienceTrack) {
+ if (SampleManager.IsStreamPlaying(0))
+ m_bDontServiceAmbienceTrack = false;
+ } else ServiceTrack();
+ } else {
+ if (m_nPreviousStreamedSound < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nPreviousStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nPreviousStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile(0);
+ }
+ uint32 pos = GetTrackStartPos(m_nCurrentStreamedSound);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 1, 0);
+ if (SampleManager.StartStreamedFile(m_nCurrentStreamedSound, pos, 0)) {
+ ComputeAmbienceVol(true, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
+ m_bDontServiceAmbienceTrack = true;
+ } else
+ m_nCurrentStreamedSound = NO_STREAMED_SOUND;
+ }
}
-WRAPPER
void
-cMusicManager::ResetMusicAfterReload()
+cMusicManager::ComputeAmbienceVol(uint8 reset, uint8 &outVolume)
{
- EAXJMP(0x57CF30);
+ static float fVol = 0.0f;
+
+ if (reset)
+ fVol = 0.0f;
+ else if (fVol < 60.0f)
+ fVol += 1.0f;
+
+ if (TheCamera.DistanceToWater > 70.0f)
+ outVolume = fVol;
+ else if (TheCamera.DistanceToWater > 45.0f)
+ outVolume = (TheCamera.DistanceToWater - 45.0f) / 25.0f * fVol;
+ else if (TheCamera.DistanceToWater > 20.0f)
+ outVolume = (45.0f - TheCamera.DistanceToWater) / 25.0f * fVol;
+ else
+ outVolume = fVol;
}
-WRAPPER
-void cMusicManager::ResetTimers(int32) { EAXJMP(0x57D420); }
-
-WRAPPER
void
-cMusicManager::Service()
+cMusicManager::ServiceTrack()
{
- EAXJMP(0x57D440);
+ if (m_bDoTrackService) {
+ if (!SampleManager.IsStreamPlaying(0))
+ SampleManager.StartStreamedFile(m_nCurrentStreamedSound, 0, 0);
+ }
}
+
+bool
+cMusicManager::ServiceAnnouncement()
+{
+ static int8 cCheck = 0;
+ if (m_bAnnouncementInProgress) {
+ if (!SampleManager.IsStreamPlaying(0)) {
+ m_nAnnouncement = NO_STREAMED_SOUND;
+ m_bAnnouncementInProgress = false;
+ }
+ return true;
+ }
+
+ if (++cCheck >= 30) {
+ cCheck = 0;
+ int pos = SampleManager.GetStreamedFilePosition(0);
+ if (SampleManager.IsStreamPlaying(0)) {
+ if (m_nCurrentStreamedSound != NO_STREAMED_SOUND) {
+ m_aTracks[m_nCurrentStreamedSound].m_nPosition = pos;
+ m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile(0);
+ }
+ }
+
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ if (SampleManager.StartStreamedFile(m_nAnnouncement, 0, 0)) {
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.IsMissionAudioPlaying() ? 25 : 100, 63, 0, 0);
+ m_bAnnouncementInProgress = true;
+ m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nCurrentStreamedSound = m_nAnnouncement;
+ return true;
+ }
+
+ if (cCheck != 0) cCheck--;
+ else cCheck = 30;
+ return false;
+ }
+
+ return false;
+}
+
+uint8
+cMusicManager::GetCarTuning()
+{
+ CVehicle *veh = FindPlayerVehicle();
+ if (veh == nil) return RADIO_OFF;
+ if (UsesPoliceRadio(veh)) return POLICE_RADIO;
+ if (veh->m_nRadioStation == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable())
+ veh->m_nRadioStation = AudioManager.GetRandomNumber(2) % USERTRACK;
+ return veh->m_nRadioStation;
+}
+
+uint8
+cMusicManager::GetNextCarTuning()
+{
+ CVehicle *veh = FindPlayerVehicle();
+ if (veh == nil) return RADIO_OFF;
+ if (UsesPoliceRadio(veh)) return POLICE_RADIO;
+ if (gNumRetunePresses != 0) {
+ if (SampleManager.IsMP3RadioChannelAvailable()) {
+ if (veh->m_nRadioStation == RADIO_OFF)
+ veh->m_nRadioStation = POLICE_RADIO;
+ veh->m_nRadioStation += gNumRetunePresses;
+ if (veh->m_nRadioStation == POLICE_RADIO)
+ veh->m_nRadioStation = RADIO_OFF;
+ else if (veh->m_nRadioStation > POLICE_RADIO)
+ veh->m_nRadioStation -= RADIO_OFF;
+ } else if (gNumRetunePresses + veh->m_nRadioStation >= USERTRACK) {
+ while (gNumRetunePresses) {
+ if (veh->m_nRadioStation == RADIO_OFF)
+ veh->m_nRadioStation = HEAD_RADIO;
+ else if (veh->m_nRadioStation < USERTRACK)
+ ++veh->m_nRadioStation;
+
+ if (veh->m_nRadioStation == USERTRACK)
+ veh->m_nRadioStation = RADIO_OFF;
+ --gNumRetunePresses;
+ }
+ } else
+ veh->m_nRadioStation += gNumRetunePresses;
+ gNumRetunePresses = 0;
+ }
+ return veh->m_nRadioStation;
+}
+
+bool
+cMusicManager::ChangeRadioChannel()
+{
+ if (m_nCurrentStreamedSound != m_nPreviousStreamedSound) {
+ if (m_nPreviousStreamedSound < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nPreviousStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
+ m_aTracks[m_nPreviousStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.StopStreamedFile(0);
+ }
+ if (SampleManager.IsStreamPlaying(0))
+ return false;
+ if (!SampleManager.StartStreamedFile(m_nCurrentStreamedSound, GetTrackStartPos(m_nCurrentStreamedSound), 0))
+ return false;
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.IsMissionAudioPlaying() ? 25 : 100, 63, 0, 0);
+ }
+ return true;
+}
+
+STARTPATCHES
+InjectHook(0x57E4B0, &cMusicManager::PlayerInCar, PATCH_JUMP);
+InjectHook(0x57E6D0, &cMusicManager::DisplayRadioStationName, PATCH_JUMP);
+InjectHook(0x57CF70, &cMusicManager::Initialise, PATCH_JUMP);
+InjectHook(0x57D140, &cMusicManager::Terminate, PATCH_JUMP);
+InjectHook(0x57D1D0, &cMusicManager::GetRadioInCar, PATCH_JUMP);
+InjectHook(0x57D2C0, &cMusicManager::SetRadioInCar, PATCH_JUMP);
+InjectHook(0x57D180, &cMusicManager::SetRadioChannelByScript, PATCH_JUMP);
+InjectHook(0x57CF30, &cMusicManager::ResetMusicAfterReload, PATCH_JUMP);
+InjectHook(0x57E6A0, &cMusicManager::UsesPoliceRadio, PATCH_JUMP);
+InjectHook(0x57D310, &cMusicManager::ChangeMusicMode, PATCH_JUMP);
+InjectHook(0x57D420, &cMusicManager::ResetTimers, PATCH_JUMP);
+InjectHook(0x57D440, &cMusicManager::Service, PATCH_JUMP);
+InjectHook(0x57D530, &cMusicManager::ServiceFrontEndMode, PATCH_JUMP);
+InjectHook(0x57E3D0, &cMusicManager::StopFrontEndTrack, PATCH_JUMP);
+InjectHook(0x57E430, &cMusicManager::PlayAnnouncement, PATCH_JUMP);
+InjectHook(0x57E2E0, &cMusicManager::PlayFrontEndTrack, PATCH_JUMP);
+InjectHook(0x57E210, &cMusicManager::PreloadCutSceneMusic, PATCH_JUMP);
+InjectHook(0x57E290, &cMusicManager::PlayPreloadedCutSceneMusic, PATCH_JUMP);
+InjectHook(0x57E2B0, &cMusicManager::StopCutSceneMusic, PATCH_JUMP);
+InjectHook(0x57E450, &cMusicManager::GetTrackStartPos, PATCH_JUMP);
+InjectHook(0x57D690, &cMusicManager::ServiceGameMode, PATCH_JUMP);
+InjectHook(0x57DCB0, &cMusicManager::ServiceAmbience, PATCH_JUMP);
+InjectHook(0x57DEA0, &cMusicManager::ComputeAmbienceVol, PATCH_JUMP);
+InjectHook(0x57E100, &cMusicManager::ServiceTrack, PATCH_JUMP);
+InjectHook(0x57DFC0, &cMusicManager::ServiceAnnouncement, PATCH_JUMP);
+InjectHook(0x57E530, &cMusicManager::GetCarTuning, PATCH_JUMP);
+InjectHook(0x57E5A0, &cMusicManager::GetNextCarTuning, PATCH_JUMP);
+InjectHook(0x57E130, &cMusicManager::ChangeRadioChannel, PATCH_JUMP);
+ENDPATCHES \ No newline at end of file
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index 709fe56a..5c255069 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -2,7 +2,7 @@
#include "audio_enums.h"
-class tMP3Sample
+class tStreamedSample
{
public:
uint32 m_nLength;
@@ -10,52 +10,46 @@ public:
uint32 m_nLastPosCheckTimer;
};
+class CVehicle;
+
class cMusicManager
{
public:
bool m_bIsInitialised;
- uint8 field_1;
+ bool m_bDisabled;
uint8 m_nMusicMode;
uint8 m_nCurrentStreamedSound;
uint8 m_nPreviousStreamedSound;
- uint8 field_5;
- uint8 field_6;
- uint8 field_7;
- bool m_bAnnouncement;
+ bool m_bFrontendTrackFinished;
+ bool m_bPlayInFrontend;
+ bool m_bSetNextStation;
+ uint8 m_nAnnouncement;
bool m_bPreviousPlayerInCar;
bool m_bPlayerInCar;
bool m_bAnnouncementInProgress;
- tMP3Sample m_asMP3Samples[TOTAL_STREAMED_SOUNDS];
- uint8 field_2364;
- uint8 field_2365;
- uint8 field_2366;
- uint8 field_2367;
- uint32 field_2368;
- uint32 field_2372;
- uint32 field_2376;
- uint8 field_2380;
- uint8 field_2381;
- uint8 field_2382;
+ tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
+ bool m_bResetTimers;
+ uint32 m_nResetTime;
+ uint32 m_nLastTrackServiceTime;
+ uint32 m_nTimer;
+ bool m_bDoTrackService;
+ bool m_bIgnoreTimeDelay;
+ bool m_bDontServiceAmbienceTrack;
bool m_bRadioSetByScript;
uint8 m_nRadioStation;
- uint8 field_2385;
- uint8 field_2386;
- uint8 field_2387;
- uint32 m_nRadioPosition;
- bool m_bRadioInCar;
- uint8 field_2393;
- uint8 field_2394;
- uint8 field_2395;
+ int32 m_nRadioPosition;
+ uint8 m_nRadioInCar;
public:
+ cMusicManager();
bool IsInitialised() { return m_bIsInitialised; }
uint32 GetMusicMode() { return m_nMusicMode; }
uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
- void Initialise();
+ bool Initialise();
void Terminate();
- void ChangeMusicMode(int32 mode);
+ void ChangeMusicMode(uint8 mode);
void StopFrontEndTrack();
bool PlayerInCar();
@@ -66,7 +60,7 @@ public:
void PreloadCutSceneMusic(uint8);
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
- int32 GetRadioInCar(void);
+ uint8 GetRadioInCar(void);
void SetRadioInCar(uint32);
void SetRadioChannelByScript(uint8, int32);
@@ -74,6 +68,20 @@ public:
void ResetTimers(int32);
void Service();
+ void ServiceFrontEndMode();
+ void ServiceGameMode();
+ void ServiceAmbience();
+ void ServiceTrack();
+
+ bool UsesPoliceRadio(CVehicle *veh);
+ uint32 GetTrackStartPos(uint8);
+
+ void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
+ bool ServiceAnnouncement();
+
+ uint8 GetCarTuning();
+ uint8 GetNextCarTuning();
+ bool ChangeRadioChannel();
};
static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error");
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index d90ed4b4..42ad3829 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -124,8 +124,8 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nEntityIndex = m_nPoliceChannelEntity;
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
- m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 1;
+ m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
+ m_sQueueSample.m_bIsDistant = true;
m_sQueueSample.field_16 = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_bVolume = m_anRandomTable[2] % 20 + 15;
@@ -134,10 +134,10 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.field_56 = 0;
- m_sQueueSample.m_bReverbFlag = 0;
+ m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bOffset = 63;
m_sQueueSample.field_76 = 3;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h
index 86f9f87f..8136ff66 100644
--- a/src/audio/audio_enums.h
+++ b/src/audio/audio_enums.h
@@ -21,210 +21,210 @@ enum eMusicMode
MUSICMODE_FRONTEND = 0,
MUSICMODE_GAME,
MUSICMODE_CUTSCENE,
- MUSICMODE_OFF,
- MUSICMODE_4,
+ MUSICMODE_DISABLE,
+ MUSICMODE_DISABLED,
};
enum eStreamedSounds
{
- STREAMED_SOUND_RADIO_HEAD = 0,
- STREAMED_SOUND_RADIO_CLASSIC = 1,
- STREAMED_SOUND_RADIO_KJAH = 2,
- STREAMED_SOUND_RADIO_RISE = 3,
- STREAMED_SOUND_RADIO_LIPS = 4,
- STREAMED_SOUND_RADIO_GAME = 5,
- STREAMED_SOUND_RADIO_MSX = 6,
- STREAMED_SOUND_RADIO_FLASH = 7,
- STREAMED_SOUND_RADIO_CHAT = 8,
- STREAMED_SOUND_RADIO_MP3_PLAYER = 9,
- STREAMED_SOUND_RADIO_POLICE = 10,
- STREAMED_SOUND_CITY_AMBIENT = 11,
- STREAMED_SOUND_WATER_AMBIENT = 12,
- STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN = 13,
- STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN = 14,
- STREAMED_SOUND_NEWS_INTRO = 15,
- STREAMED_SOUND_BANK_INTRO = 16,
- STREAMED_SOUND_CUTSCENE_LUIGI1_LG = 17,
- STREAMED_SOUND_CUTSCENE_LUIGI2_DSB = 18,
- STREAMED_SOUND_CUTSCENE_LUIGI3_DM = 19,
- STREAMED_SOUND_CUTSCENE_LUIGI4_PAP = 20,
- STREAMED_SOUND_CUTSCENE_LUIGI5_TFB = 21,
- STREAMED_SOUND_CUTSCENE_JOEY0_DM2 = 22,
- STREAMED_SOUND_CUTSCENE_JOEY1_LFL = 23,
- STREAMED_SOUND_CUTSCENE_JOEY2_KCL = 24,
- STREAMED_SOUND_CUTSCENE_JOEY3_VH = 25,
- STREAMED_SOUND_CUTSCENE_JOEY4_ETH = 26,
- STREAMED_SOUND_CUTSCENE_JOEY5_DST = 27,
- STREAMED_SOUND_CUTSCENE_JOEY6_TBJ = 28,
- STREAMED_SOUND_CUTSCENE_TONI1_TOL = 29,
- STREAMED_SOUND_CUTSCENE_TONI2_TPU = 30,
- STREAMED_SOUND_CUTSCENE_TONI3_MAS = 31,
- STREAMED_SOUND_CUTSCENE_TONI4_TAT = 32,
- STREAMED_SOUND_CUTSCENE_TONI5_BF = 33,
- STREAMED_SOUND_CUTSCENE_SAL0_MAS = 34,
- STREAMED_SOUND_CUTSCENE_SAL1_PF = 35,
- STREAMED_SOUND_CUTSCENE_SAL2_CTG = 36,
- STREAMED_SOUND_CUTSCENE_SAL3_RTC = 37,
- STREAMED_SOUND_CUTSCENE_SAL5_LRQ = 38,
- STREAMED_SOUND_CUTSCENE_SAL4_BDBA = 39,
- STREAMED_SOUND_CUTSCENE_SAL4_BDBB = 40,
- STREAMED_SOUND_CUTSCENE_SAL2_CTG2 = 41,
- STREAMED_SOUND_CUTSCENE_SAL4_BDBD = 42,
- STREAMED_SOUND_CUTSCENE_SAL5_LRQB = 43,
- STREAMED_SOUND_CUTSCENE_SAL5_LRQC = 44,
- STREAMED_SOUND_CUTSCENE_ASUKA_1_SSO = 45,
- STREAMED_SOUND_CUTSCENE_ASUKA_2_PP = 46,
- STREAMED_SOUND_CUTSCENE_ASUKA_3_SS = 47,
- STREAMED_SOUND_CUTSCENE_ASUKA_4_PDR = 48,
- STREAMED_SOUND_CUTSCENE_ASUKA_5_K2FT = 49,
- STREAMED_SOUND_CUTSCENE_KENJI1_KBO = 50,
- STREAMED_SOUND_CUTSCENE_KENJI2_GIS = 51,
- STREAMED_SOUND_CUTSCENE_KENJI3_DS = 52,
- STREAMED_SOUND_CUTSCENE_KENJI4_SHI = 53,
- STREAMED_SOUND_CUTSCENE_KENJI5_SD = 54,
- STREAMED_SOUND_CUTSCENE_RAY0_PDR2 = 55,
- STREAMED_SOUND_CUTSCENE_RAY1_SW = 56,
- STREAMED_SOUND_CUTSCENE_RAY2_AP = 57,
- STREAMED_SOUND_CUTSCENE_RAY3_ED = 58,
- STREAMED_SOUND_CUTSCENE_RAY4_GF = 59,
- STREAMED_SOUND_CUTSCENE_RAY5_PB = 60,
- STREAMED_SOUND_CUTSCENE_RAY6_MM = 61,
- STREAMED_SOUND_CUTSCENE_DONALD1_STOG = 62,
- STREAMED_SOUND_CUTSCENE_DONALD2_KK = 63,
- STREAMED_SOUND_CUTSCENE_DONALD3_ADO = 64,
- STREAMED_SOUND_CUTSCENE_DONALD5_ES = 65,
- STREAMED_SOUND_CUTSCENE_DONALD7_MLD = 66,
- STREAMED_SOUND_CUTSCENE_DONALD4_GTA = 67,
- STREAMED_SOUND_CUTSCENE_DONALD4_GTA2 = 68,
- STREAMED_SOUND_CUTSCENE_DONALD6_STS = 69,
- STREAMED_SOUND_CUTSCENE_ASUKA6_BAIT = 70,
- STREAMED_SOUND_CUTSCENE_ASUKA7_ETG = 71,
- STREAMED_SOUND_CUTSCENE_ASUKA8_PS = 72,
- STREAMED_SOUND_CUTSCENE_ASUKA9_ASD = 73,
- STREAMED_SOUND_CUTSCENE_KENJI4_SHI2 = 74,
- STREAMED_SOUND_CUTSCENE_CATALINA1_TEX = 75,
- STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1 = 76,
- STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2 = 77,
- STREAMED_SOUND_CUTSCENE_ELBURRO3_PH3 = 78,
- STREAMED_SOUND_CUTSCENE_ELBURRO4_PH4 = 79,
- STREAMED_SOUND_CUTSCENE_YARDIE_PH1 = 80,
- STREAMED_SOUND_CUTSCENE_YARDIE_PH2 = 81,
- STREAMED_SOUND_CUTSCENE_YARDIE_PH3 = 82,
- STREAMED_SOUND_CUTSCENE_YARDIE_PH4 = 83,
- STREAMED_SOUND_CUTSCENE_HOODS_PH1 = 84,
- STREAMED_SOUND_CUTSCENE_HOODS_PH2 = 85,
- STREAMED_SOUND_CUTSCENE_HOODS_PH3 = 86,
- STREAMED_SOUND_CUTSCENE_HOODS_PH4 = 87,
- STREAMED_SOUND_CUTSCENE_HOODS_PH5 = 88,
- STREAMED_SOUND_CUTSCENE_MARTY_PH1 = 89,
- STREAMED_SOUND_CUTSCENE_MARTY_PH2 = 90,
- STREAMED_SOUND_CUTSCENE_MARTY_PH3 = 91,
- STREAMED_SOUND_CUTSCENE_MARTY_PH4 = 92,
- STREAMED_SOUND_MISSION_COMPLETED = 93,
- STREAMED_SOUND_GAME_COMPLETED = 94,
- STREAMED_SOUND_MISSION_LIB_A1 = 95,
- STREAMED_SOUND_MISSION_LIB_A2 = 96,
- STREAMED_SOUND_MISSION_LIB_A = 97,
- STREAMED_SOUND_MISSION_LIB_B = 98,
- STREAMED_SOUND_MISSION_LIB_C = 99,
- STREAMED_SOUND_MISSION_LIB_D = 100,
- STREAMED_SOUND_MISSION_L2_A = 101,
- STREAMED_SOUND_MISSION_J4T_1 = 102,
- STREAMED_SOUND_MISSION_J4T_2 = 103,
- STREAMED_SOUND_MISSION_J4T_3 = 104,
- STREAMED_SOUND_MISSION_J4T_4 = 105,
- STREAMED_SOUND_MISSION_J4_A = 106,
- STREAMED_SOUND_MISSION_J4_B = 107,
- STREAMED_SOUND_MISSION_J4_C = 108,
- STREAMED_SOUND_MISSION_J4_D = 109,
- STREAMED_SOUND_MISSION_J4_E = 110,
- STREAMED_SOUND_MISSION_J4_F = 111,
- STREAMED_SOUND_MISSION_J6_1 = 112,
- STREAMED_SOUND_MISSION_J6_A = 113,
- STREAMED_SOUND_MISSION_J6_B = 114,
- STREAMED_SOUND_MISSION_J6_C = 115,
- STREAMED_SOUND_MISSION_J6_D = 116,
- STREAMED_SOUND_MISSION_T4_A = 117,
- STREAMED_SOUND_MISSION_S1_A = 118,
- STREAMED_SOUND_MISSION_S1_A1 = 119,
- STREAMED_SOUND_MISSION_S1_B = 120,
- STREAMED_SOUND_MISSION_S1_C = 121,
- STREAMED_SOUND_MISSION_S1_C1 = 122,
- STREAMED_SOUND_MISSION_S1_D = 123,
- STREAMED_SOUND_MISSION_S1_E = 124,
- STREAMED_SOUND_MISSION_S1_F = 125,
- STREAMED_SOUND_MISSION_S1_G = 126,
- STREAMED_SOUND_MISSION_S1_H = 127,
- STREAMED_SOUND_MISSION_S1_I = 128,
- STREAMED_SOUND_MISSION_S1_J = 129,
- STREAMED_SOUND_MISSION_S1_K = 130,
- STREAMED_SOUND_MISSION_S1_L = 131,
- STREAMED_SOUND_MISSION_S3_A = 132,
- STREAMED_SOUND_MISSION_S3_B = 133,
- STREAMED_SOUND_MISSION_EL3_A = 134,
- STREAMED_SOUND_MISSION_MF1_A = 135,
- STREAMED_SOUND_MISSION_MF2_A = 136,
- STREAMED_SOUND_MISSION_MF3_A = 137,
- STREAMED_SOUND_MISSION_MF3_B = 138,
- STREAMED_SOUND_MISSION_MF3_B1 = 139,
- STREAMED_SOUND_MISSION_MF3_C = 140,
- STREAMED_SOUND_MISSION_MF4_A = 141,
- STREAMED_SOUND_MISSION_MF4_B = 142,
- STREAMED_SOUND_MISSION_MF4_C = 143,
- STREAMED_SOUND_MISSION_A1_A = 144,
- STREAMED_SOUND_MISSION_A3_A = 145,
- STREAMED_SOUND_MISSION_A5_A = 146,
- STREAMED_SOUND_MISSION_A4_A = 147,
- STREAMED_SOUND_MISSION_A4_B = 148,
- STREAMED_SOUND_MISSION_A4_C = 149,
- STREAMED_SOUND_MISSION_A4_D = 150,
- STREAMED_SOUND_MISSION_K1_A = 151,
- STREAMED_SOUND_MISSION_K3_A = 152,
- STREAMED_SOUND_MISSION_R1_A = 153,
- STREAMED_SOUND_MISSION_R2_A = 154,
- STREAMED_SOUND_MISSION_R2_B = 155,
- STREAMED_SOUND_MISSION_R2_C = 156,
- STREAMED_SOUND_MISSION_R2_D = 157,
- STREAMED_SOUND_MISSION_R2_E = 158,
- STREAMED_SOUND_MISSION_R2_F = 159,
- STREAMED_SOUND_MISSION_R2_G = 160,
- STREAMED_SOUND_MISSION_R2_H = 161,
- STREAMED_SOUND_MISSION_R5_A = 162,
- STREAMED_SOUND_MISSION_R6_A = 163,
- STREAMED_SOUND_MISSION_R6_A1 = 164,
- STREAMED_SOUND_MISSION_R6_B = 165,
- STREAMED_SOUND_MISSION_LO2_A = 166,
- STREAMED_SOUND_MISSION_LO6_A = 167,
- STREAMED_SOUND_MISSION_YD2_A = 168,
- STREAMED_SOUND_MISSION_YD2_B = 169,
- STREAMED_SOUND_MISSION_YD2_C = 170,
- STREAMED_SOUND_MISSION_YD2_C1 = 171,
- STREAMED_SOUND_MISSION_YD2_D = 172,
- STREAMED_SOUND_MISSION_YD2_E = 173,
- STREAMED_SOUND_MISSION_YD2_F = 174,
- STREAMED_SOUND_MISSION_YD2_G = 175,
- STREAMED_SOUND_MISSION_YD2_H = 176,
- STREAMED_SOUND_MISSION_YD2_ASS = 177,
- STREAMED_SOUND_MISSION_YD2_OK = 178,
- STREAMED_SOUND_MISSION_H5_A = 179,
- STREAMED_SOUND_MISSION_H5_B = 180,
- STREAMED_SOUND_MISSION_H5_C = 181,
- STREAMED_SOUND_MISSION_AMMU_A = 182,
- STREAMED_SOUND_MISSION_AMMU_B = 183,
- STREAMED_SOUND_MISSION_AMMU_C = 184,
- STREAMED_SOUND_MISSION_DOOR_1 = 185,
- STREAMED_SOUND_MISSION_DOOR_2 = 186,
- STREAMED_SOUND_MISSION_DOOR_3 = 187,
- STREAMED_SOUND_MISSION_DOOR_4 = 188,
- STREAMED_SOUND_MISSION_DOOR_5 = 189,
- STREAMED_SOUND_MISSION_DOOR_6 = 190,
- STREAMED_SOUND_MISSION_T3_A = 191,
- STREAMED_SOUND_MISSION_T3_B = 192,
- STREAMED_SOUND_MISSION_T3_C = 193,
- STREAMED_SOUND_MISSION_K1_B = 194,
- STREAMED_SOUND_MISSION_CAT1 = 195,
- TOTAL_STREAMED_SOUNDS = 196,
- NO_STREAMED_SOUND = 197,
+ STREAMED_SOUND_RADIO_HEAD,
+ STREAMED_SOUND_RADIO_CLASSIC,
+ STREAMED_SOUND_RADIO_KJAH,
+ STREAMED_SOUND_RADIO_RISE,
+ STREAMED_SOUND_RADIO_LIPS,
+ STREAMED_SOUND_RADIO_GAME,
+ STREAMED_SOUND_RADIO_MSX,
+ STREAMED_SOUND_RADIO_FLASH,
+ STREAMED_SOUND_RADIO_CHAT,
+ STREAMED_SOUND_RADIO_MP3_PLAYER,
+ STREAMED_SOUND_RADIO_POLICE,
+ STREAMED_SOUND_CITY_AMBIENT,
+ STREAMED_SOUND_WATER_AMBIENT,
+ STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN,
+ STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN,
+ STREAMED_SOUND_NEWS_INTRO,
+ STREAMED_SOUND_BANK_INTRO,
+ STREAMED_SOUND_CUTSCENE_LUIGI1_LG,
+ STREAMED_SOUND_CUTSCENE_LUIGI2_DSB,
+ STREAMED_SOUND_CUTSCENE_LUIGI3_DM,
+ STREAMED_SOUND_CUTSCENE_LUIGI4_PAP,
+ STREAMED_SOUND_CUTSCENE_LUIGI5_TFB,
+ STREAMED_SOUND_CUTSCENE_JOEY0_DM2,
+ STREAMED_SOUND_CUTSCENE_JOEY1_LFL,
+ STREAMED_SOUND_CUTSCENE_JOEY2_KCL,
+ STREAMED_SOUND_CUTSCENE_JOEY3_VH,
+ STREAMED_SOUND_CUTSCENE_JOEY4_ETH,
+ STREAMED_SOUND_CUTSCENE_JOEY5_DST,
+ STREAMED_SOUND_CUTSCENE_JOEY6_TBJ,
+ STREAMED_SOUND_CUTSCENE_TONI1_TOL,
+ STREAMED_SOUND_CUTSCENE_TONI2_TPU,
+ STREAMED_SOUND_CUTSCENE_TONI3_MAS,
+ STREAMED_SOUND_CUTSCENE_TONI4_TAT,
+ STREAMED_SOUND_CUTSCENE_TONI5_BF,
+ STREAMED_SOUND_CUTSCENE_SAL0_MAS,
+ STREAMED_SOUND_CUTSCENE_SAL1_PF,
+ STREAMED_SOUND_CUTSCENE_SAL2_CTG,
+ STREAMED_SOUND_CUTSCENE_SAL3_RTC,
+ STREAMED_SOUND_CUTSCENE_SAL5_LRQ,
+ STREAMED_SOUND_CUTSCENE_SAL4_BDBA,
+ STREAMED_SOUND_CUTSCENE_SAL4_BDBB,
+ STREAMED_SOUND_CUTSCENE_SAL2_CTG2,
+ STREAMED_SOUND_CUTSCENE_SAL4_BDBD,
+ STREAMED_SOUND_CUTSCENE_SAL5_LRQB,
+ STREAMED_SOUND_CUTSCENE_SAL5_LRQC,
+ STREAMED_SOUND_CUTSCENE_ASUKA_1_SSO,
+ STREAMED_SOUND_CUTSCENE_ASUKA_2_PP,
+ STREAMED_SOUND_CUTSCENE_ASUKA_3_SS,
+ STREAMED_SOUND_CUTSCENE_ASUKA_4_PDR,
+ STREAMED_SOUND_CUTSCENE_ASUKA_5_K2FT,
+ STREAMED_SOUND_CUTSCENE_KENJI1_KBO,
+ STREAMED_SOUND_CUTSCENE_KENJI2_GIS,
+ STREAMED_SOUND_CUTSCENE_KENJI3_DS,
+ STREAMED_SOUND_CUTSCENE_KENJI4_SHI,
+ STREAMED_SOUND_CUTSCENE_KENJI5_SD,
+ STREAMED_SOUND_CUTSCENE_RAY0_PDR2,
+ STREAMED_SOUND_CUTSCENE_RAY1_SW,
+ STREAMED_SOUND_CUTSCENE_RAY2_AP,
+ STREAMED_SOUND_CUTSCENE_RAY3_ED,
+ STREAMED_SOUND_CUTSCENE_RAY4_GF,
+ STREAMED_SOUND_CUTSCENE_RAY5_PB,
+ STREAMED_SOUND_CUTSCENE_RAY6_MM,
+ STREAMED_SOUND_CUTSCENE_DONALD1_STOG,
+ STREAMED_SOUND_CUTSCENE_DONALD2_KK,
+ STREAMED_SOUND_CUTSCENE_DONALD3_ADO,
+ STREAMED_SOUND_CUTSCENE_DONALD5_ES,
+ STREAMED_SOUND_CUTSCENE_DONALD7_MLD,
+ STREAMED_SOUND_CUTSCENE_DONALD4_GTA,
+ STREAMED_SOUND_CUTSCENE_DONALD4_GTA2,
+ STREAMED_SOUND_CUTSCENE_DONALD6_STS,
+ STREAMED_SOUND_CUTSCENE_ASUKA6_BAIT,
+ STREAMED_SOUND_CUTSCENE_ASUKA7_ETG,
+ STREAMED_SOUND_CUTSCENE_ASUKA8_PS,
+ STREAMED_SOUND_CUTSCENE_ASUKA9_ASD,
+ STREAMED_SOUND_CUTSCENE_KENJI4_SHI2,
+ STREAMED_SOUND_CUTSCENE_CATALINA1_TEX,
+ STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1,
+ STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2,
+ STREAMED_SOUND_CUTSCENE_ELBURRO3_PH3,
+ STREAMED_SOUND_CUTSCENE_ELBURRO4_PH4,
+ STREAMED_SOUND_CUTSCENE_YARDIE_PH1,
+ STREAMED_SOUND_CUTSCENE_YARDIE_PH2,
+ STREAMED_SOUND_CUTSCENE_YARDIE_PH3,
+ STREAMED_SOUND_CUTSCENE_YARDIE_PH4,
+ STREAMED_SOUND_CUTSCENE_HOODS_PH1,
+ STREAMED_SOUND_CUTSCENE_HOODS_PH2,
+ STREAMED_SOUND_CUTSCENE_HOODS_PH3,
+ STREAMED_SOUND_CUTSCENE_HOODS_PH4,
+ STREAMED_SOUND_CUTSCENE_HOODS_PH5,
+ STREAMED_SOUND_CUTSCENE_MARTY_PH1,
+ STREAMED_SOUND_CUTSCENE_MARTY_PH2,
+ STREAMED_SOUND_CUTSCENE_MARTY_PH3,
+ STREAMED_SOUND_CUTSCENE_MARTY_PH4,
+ STREAMED_SOUND_MISSION_COMPLETED,
+ STREAMED_SOUND_GAME_COMPLETED,
+ STREAMED_SOUND_MISSION_LIB_A1,
+ STREAMED_SOUND_MISSION_LIB_A2,
+ STREAMED_SOUND_MISSION_LIB_A,
+ STREAMED_SOUND_MISSION_LIB_B,
+ STREAMED_SOUND_MISSION_LIB_C,
+ STREAMED_SOUND_MISSION_LIB_D,
+ STREAMED_SOUND_MISSION_L2_A,
+ STREAMED_SOUND_MISSION_J4T_1,
+ STREAMED_SOUND_MISSION_J4T_2,
+ STREAMED_SOUND_MISSION_J4T_3,
+ STREAMED_SOUND_MISSION_J4T_4,
+ STREAMED_SOUND_MISSION_J4_A,
+ STREAMED_SOUND_MISSION_J4_B,
+ STREAMED_SOUND_MISSION_J4_C,
+ STREAMED_SOUND_MISSION_J4_D,
+ STREAMED_SOUND_MISSION_J4_E,
+ STREAMED_SOUND_MISSION_J4_F,
+ STREAMED_SOUND_MISSION_J6_1,
+ STREAMED_SOUND_MISSION_J6_A,
+ STREAMED_SOUND_MISSION_J6_B,
+ STREAMED_SOUND_MISSION_J6_C,
+ STREAMED_SOUND_MISSION_J6_D,
+ STREAMED_SOUND_MISSION_T4_A,
+ STREAMED_SOUND_MISSION_S1_A,
+ STREAMED_SOUND_MISSION_S1_A1,
+ STREAMED_SOUND_MISSION_S1_B,
+ STREAMED_SOUND_MISSION_S1_C,
+ STREAMED_SOUND_MISSION_S1_C1,
+ STREAMED_SOUND_MISSION_S1_D,
+ STREAMED_SOUND_MISSION_S1_E,
+ STREAMED_SOUND_MISSION_S1_F,
+ STREAMED_SOUND_MISSION_S1_G,
+ STREAMED_SOUND_MISSION_S1_H,
+ STREAMED_SOUND_MISSION_S1_I,
+ STREAMED_SOUND_MISSION_S1_J,
+ STREAMED_SOUND_MISSION_S1_K,
+ STREAMED_SOUND_MISSION_S1_L,
+ STREAMED_SOUND_MISSION_S3_A,
+ STREAMED_SOUND_MISSION_S3_B,
+ STREAMED_SOUND_MISSION_EL3_A,
+ STREAMED_SOUND_MISSION_MF1_A,
+ STREAMED_SOUND_MISSION_MF2_A,
+ STREAMED_SOUND_MISSION_MF3_A,
+ STREAMED_SOUND_MISSION_MF3_B,
+ STREAMED_SOUND_MISSION_MF3_B1,
+ STREAMED_SOUND_MISSION_MF3_C,
+ STREAMED_SOUND_MISSION_MF4_A,
+ STREAMED_SOUND_MISSION_MF4_B,
+ STREAMED_SOUND_MISSION_MF4_C,
+ STREAMED_SOUND_MISSION_A1_A,
+ STREAMED_SOUND_MISSION_A3_A,
+ STREAMED_SOUND_MISSION_A5_A,
+ STREAMED_SOUND_MISSION_A4_A,
+ STREAMED_SOUND_MISSION_A4_B,
+ STREAMED_SOUND_MISSION_A4_C,
+ STREAMED_SOUND_MISSION_A4_D,
+ STREAMED_SOUND_MISSION_K1_A,
+ STREAMED_SOUND_MISSION_K3_A,
+ STREAMED_SOUND_MISSION_R1_A,
+ STREAMED_SOUND_MISSION_R2_A,
+ STREAMED_SOUND_MISSION_R2_B,
+ STREAMED_SOUND_MISSION_R2_C,
+ STREAMED_SOUND_MISSION_R2_D,
+ STREAMED_SOUND_MISSION_R2_E,
+ STREAMED_SOUND_MISSION_R2_F,
+ STREAMED_SOUND_MISSION_R2_G,
+ STREAMED_SOUND_MISSION_R2_H,
+ STREAMED_SOUND_MISSION_R5_A,
+ STREAMED_SOUND_MISSION_R6_A,
+ STREAMED_SOUND_MISSION_R6_A1,
+ STREAMED_SOUND_MISSION_R6_B,
+ STREAMED_SOUND_MISSION_LO2_A,
+ STREAMED_SOUND_MISSION_LO6_A,
+ STREAMED_SOUND_MISSION_YD2_A,
+ STREAMED_SOUND_MISSION_YD2_B,
+ STREAMED_SOUND_MISSION_YD2_C,
+ STREAMED_SOUND_MISSION_YD2_C1,
+ STREAMED_SOUND_MISSION_YD2_D,
+ STREAMED_SOUND_MISSION_YD2_E,
+ STREAMED_SOUND_MISSION_YD2_F,
+ STREAMED_SOUND_MISSION_YD2_G,
+ STREAMED_SOUND_MISSION_YD2_H,
+ STREAMED_SOUND_MISSION_YD2_ASS,
+ STREAMED_SOUND_MISSION_YD2_OK,
+ STREAMED_SOUND_MISSION_H5_A,
+ STREAMED_SOUND_MISSION_H5_B,
+ STREAMED_SOUND_MISSION_H5_C,
+ STREAMED_SOUND_MISSION_AMMU_A,
+ STREAMED_SOUND_MISSION_AMMU_B,
+ STREAMED_SOUND_MISSION_AMMU_C,
+ STREAMED_SOUND_MISSION_DOOR_1,
+ STREAMED_SOUND_MISSION_DOOR_2,
+ STREAMED_SOUND_MISSION_DOOR_3,
+ STREAMED_SOUND_MISSION_DOOR_4,
+ STREAMED_SOUND_MISSION_DOOR_5,
+ STREAMED_SOUND_MISSION_DOOR_6,
+ STREAMED_SOUND_MISSION_T3_A,
+ STREAMED_SOUND_MISSION_T3_B,
+ STREAMED_SOUND_MISSION_T3_C,
+ STREAMED_SOUND_MISSION_K1_B,
+ STREAMED_SOUND_MISSION_CAT1,
+ TOTAL_STREAMED_SOUNDS,
+ NO_STREAMED_SOUND,
};
enum AudioEntityHandle {
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index ae27cdbf..4b546911 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -17,6 +17,7 @@ enum
SAMPLEBANK_MAIN,
SAMPLEBANK_PED,
MAX_SAMPLEBANKS,
+ SAMPLEBANK_INVALID
};
#define MAX_PEDSFX 7