summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioCollision.cpp18
-rw-r--r--src/audio/AudioLogic.cpp1331
-rw-r--r--src/audio/AudioManager.cpp185
-rw-r--r--src/audio/AudioManager.h72
-rw-r--r--src/audio/PolRadio.cpp10
5 files changed, 828 insertions, 788 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 02231773..5af762f9 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -261,14 +261,14 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 11;
+ m_sQueueSample.m_nPriority = 11;
m_sQueueSample.m_nLoopCount = 1;
SET_EMITTING_VOLUME(emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -290,15 +290,15 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 6756925d..b1f269ec 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -38,6 +38,9 @@
#include "ZoneCull.h"
#include "sampman.h"
+// TODO: Get rid of *intensity* consts (and get rid of term 'intensity' in general)
+// Make them defines, not floats because they were not floats on PS2
+
#ifndef GTA_PS2
#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples
#endif
@@ -239,7 +242,7 @@ cAudioManager::ProcessReverb()
#endif
;
i++) {
- if (m_asActiveSamples[i].m_bReverbFlag)
+ if (m_asActiveSamples[i].m_bReverb)
SampleManager.SetChannelReverbFlag(i, TRUE);
}
#endif
@@ -302,53 +305,53 @@ cAudioManager::ProcessEntity(int32 id)
switch (m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessPhysical(id);
}
break;
case AUDIOTYPE_EXPLOSION:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessExplosions(id);
}
break;
case AUDIOTYPE_FIRE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessFires(id);
}
break;
case AUDIOTYPE_WEATHER:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessWeather(id);
}
break;
case AUDIOTYPE_CRANE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessCrane();
}
break;
case AUDIOTYPE_SCRIPTOBJECT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessScriptObject(id);
}
break;
case AUDIOTYPE_BRIDGE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessBridge();
}
break;
case AUDIOTYPE_FRONTEND:
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bReverb = FALSE;
ProcessFrontEnd();
break;
case AUDIOTYPE_PROJECTILE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessProjectiles();
}
break;
@@ -358,13 +361,13 @@ cAudioManager::ProcessEntity(int32 id)
break;
case AUDIOTYPE_FIREHYDRANT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessFireHydrant();
}
break;
case AUDIOTYPE_WATERCANNON:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessWaterCannon(id);
}
break;
@@ -689,15 +692,15 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
SET_EMITTING_VOLUME((uint8)emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = rainOnVehicleIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = rainOnVehicleIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -741,16 +744,16 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = (6000.f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = reverseGearIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = reverseGearIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -791,16 +794,16 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_REMOTE_CONTROLLED_CAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = (11025.f * velocityChange / params.m_pTransmission->fMaxVelocity + 11025.f);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -834,7 +837,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
if (params.m_pVehicle->m_nSurfaceTouched == SURFACE_WATER) {
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
freq = 6050 * emittingVol / 30 + 16000;
@@ -849,10 +852,10 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -888,7 +891,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f;
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
m_sQueueSample.m_nFrequency = freq + freq * multiplier;
@@ -896,10 +899,10 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1034,7 +1037,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = freq + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_6)
m_sQueueSample.m_nFrequency /= 2;
@@ -1042,10 +1045,10 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1093,20 +1096,20 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, uint32 freq, uint32 samp
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
#endif // GTA_PS2
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = freq;
if (notLooping) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_nFramesToPlay = 8;
} else {
m_sQueueSample.m_nLoopCount = 1;
}
SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1140,16 +1143,16 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 12500;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_nFramesToPlay = 8;
SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 8.0f;
- m_sQueueSample.m_SoundIntensity = 200.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 200.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1160,16 +1163,16 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 8.0f;
- m_sQueueSample.m_SoundIntensity = 90.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 90.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1341,7 +1344,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
} else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
#ifndef EXTERNAL_3D_SOUND
- m_sQueueSample.m_nOffset = ComputePan(m_sQueueSample.m_fDistance, &pos);
+ m_sQueueSample.m_nPan = ComputePan(m_sQueueSample.m_fDistance, &pos);
#endif
if (bAccelSampleStopped) {
if (CurrentPretendGear != 1 || currentGear != 2) {
@@ -1381,7 +1384,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
#else
SampleManager.SetChannelVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, ComputeVolume(85, 50.0f, m_sQueueSample.m_fDistance));
- SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nOffset);
+ SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nPan);
#endif
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
@@ -1497,15 +1500,15 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nPriority = 8;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1586,16 +1589,16 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nHornSample;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1668,15 +1671,15 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 7.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
return TRUE;
@@ -1710,16 +1713,16 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = (100 * m_sQueueSample.m_nEntityIndex & 1023) + SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(60);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1756,14 +1759,14 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) + RandomDisplacement(1000);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nLoopCount = 1;
SET_EMITTING_VOLUME(emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
@@ -1800,14 +1803,14 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nLoopCount = 1;
SET_EMITTING_VOLUME(rand);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 30.0f;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1840,12 +1843,12 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
if (engineStatus < 225) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
emittingVolume = 6;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nFrequency = 40000;
} else {
emittingVolume = 60;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -1858,10 +1861,10 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = engineDamageIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = engineDamageIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1885,16 +1888,16 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(60);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = 40.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 40.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -1956,9 +1959,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
#endif
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -1994,9 +1997,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
#endif
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -2008,9 +2011,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 68;
emittingVol = m_anRandomTable[1] % 30 + 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
} break;
case SOUND_CAR_JUMP: {
const float SOUND_INTENSITY = 35.0f;
@@ -2027,9 +2030,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nFrequency *= 2;
emittingVol /= 2;
}
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nPriority = 6;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
break;
}
case SOUND_CAR_ENGINE_START: {
@@ -2040,9 +2043,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 33;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_STARTER);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -2053,9 +2056,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 37;
m_sQueueSample.m_nFrequency = 9 * SampleManager.GetSampleBaseFrequency(SFX_GLASS_SHARD_1) / 10;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 10 + 30;
break;
@@ -2071,9 +2074,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 51;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
break;
@@ -2084,10 +2087,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 86;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SUSPENSION_SLOW_MOVE_LOOP);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_nFramesToPlay = 7;
noReflections = TRUE;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
@@ -2100,9 +2103,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 87;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHAG_SUSPENSION);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[1] % 15 + 55;
break;
@@ -2121,9 +2124,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
if (WaveIndex > 46)
WaveIndex = 41;
m_sQueueSample.m_nFrequency = (7000.f * relVol) + 6000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = (55.f * relVol);
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -2134,9 +2137,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 47;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BOAT_THUMB_OFF) + RandomDisplacement(600);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -2148,9 +2151,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 59;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 11025;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[1] % 20 + 70;
break;
@@ -2164,10 +2167,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 79;
m_sQueueSample.m_nFrequency = (3000.f * vol * 2500.0f / 96.0f) + 9000;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = (37.f * vol * 2500.0f / 96.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
noReflections = TRUE;
@@ -2179,9 +2182,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BOMB_BEEP);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
SET_SOUND_REFLECTION(TRUE);
emittingVol = 60;
@@ -2193,9 +2196,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 81;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_LAND_WHEELS);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 25 + 75;
break;
@@ -2212,9 +2215,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
GunIndex = 53;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
break;
}
case SOUND_WEAPON_HIT_VEHICLE: {
@@ -2224,9 +2227,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 34;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[3] % 20 + 90;
break;
@@ -2240,9 +2243,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 36;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARM_BOMB);
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REFLECTION(TRUE);
emittingVol = 50;
maxDist = SQR(SOUND_INTENSITY);
@@ -2270,9 +2273,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 15;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 16000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
SET_SOUND_REFLECTION(TRUE);
emittingVol = m_anRandomTable[4] % 20 + 90;
@@ -2284,9 +2287,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 48;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PED_CRUNCH_1) + RandomDisplacement(600);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
++CrunchOffset;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 20 + 55;
@@ -2305,9 +2308,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 50;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
break;
}
@@ -2316,18 +2319,18 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
}
if (params.m_fDistance < maxDist) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
if (noReflections) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
} else {
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
}
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
SET_EMITTING_VOLUME(emittingVol);
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
m_sQueueSample.m_bIs2D = FALSE;
AddSampleToRequestedQueue();
}
@@ -2359,16 +2362,16 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2381,16 +2384,16 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2426,15 +2429,15 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2464,15 +2467,15 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2520,15 +2523,15 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2562,16 +2565,16 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(vol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2617,16 +2620,16 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = gHeliSfxRanges[i].m_fMaxDistance;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2791,16 +2794,16 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2822,16 +2825,16 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2852,16 +2855,16 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_ENGINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2882,16 +2885,16 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -2912,23 +2915,23 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 12;
- m_sQueueSample.m_nOffset = 0;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 12;
+ m_sQueueSample.m_nPan = 0;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
m_sQueueSample.m_nCounter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nFrequency += 200;
- m_sQueueSample.m_nOffset = 127;
+ m_sQueueSample.m_nPan = 127;
AddSampleToRequestedQueue();
}
return TRUE;
@@ -2992,16 +2995,16 @@ cAudioManager::ProcessPedHeadphones(cPedParams &params)
m_sQueueSample.m_nSampleIndex = SFX_HEADPHONES;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_HEADPHONES);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = 7.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = 7.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -3100,14 +3103,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
default:
break;
}
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_FALL_LAND:
@@ -3127,14 +3130,14 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 17);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_FIGHT_PUNCH_33:
@@ -3189,16 +3192,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound;
narrowSoundRange = TRUE;
++iSound;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 26 + 100;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_WEAPON_BAT_ATTACK:
@@ -3207,19 +3210,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 20 + 100;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3234,19 +3237,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
maxDist = SQR(50);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[1] % 10 + 90;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3258,16 +3261,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
@@ -3276,19 +3279,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 10 + 100;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3300,16 +3303,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[1] % 15 + 70;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_M16:
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
@@ -3318,16 +3321,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 15 + 70;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_SNIPERRIFLE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
@@ -3336,19 +3339,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 110;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3360,19 +3363,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 90.0f;
+ m_sQueueSample.m_MaxDistance = 90.0f;
maxDist = SQR(90);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 80;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3383,19 +3386,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = 9;
emittingVol = 90;
m_sQueueSample.m_nFrequency = (10 * m_sQueueSample.m_nEntityIndex & 2047) + SampleManager.GetSampleBaseFrequency(SFX_FLAMETHROWER_LEFT);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
SET_EMITTING_VOLUME(90);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 6;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 6;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3444,15 +3447,15 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
SET_EMITTING_VOLUME(75);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_WEAPON_AK47_BULLET_ECHO:
@@ -3464,19 +3467,19 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_END_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 40;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = TRUE;
+ m_sQueueSample.m_bReflections = TRUE;
else
#endif
stereo = TRUE;
@@ -3487,16 +3490,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_FLAMETHROWER_START_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 70;
SET_EMITTING_VOLUME(70);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case SOUND_WEAPON_HIT_PED:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
@@ -3505,16 +3508,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 90;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case SOUND_SPLASH:
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
@@ -3522,16 +3525,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
maxDist = SQR(40);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 30 + 70;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
default:
@@ -3543,20 +3546,20 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
iSound = 21;
if (params.m_fDistance < maxDist) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
if (stereo) {
- if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_SoundIntensity) {
+ if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_MaxDistance) {
m_sQueueSample.m_bIs2D = TRUE;
- m_sQueueSample.m_nOffset = 0;
+ m_sQueueSample.m_nPan = 0;
} else {
stereo = FALSE;
}
}
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
AddSampleToRequestedQueue();
if (stereo) {
- m_sQueueSample.m_nOffset = 127;
+ m_sQueueSample.m_nPan = 127;
++m_sQueueSample.m_nSampleIndex;
if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] != SOUND_WEAPON_SHOT_FIRED ||
weapon->m_eWeaponType != WEAPONTYPE_FLAMETHROWER) {
@@ -6081,7 +6084,7 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_nCounter = 0;
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
- AudioManager.m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ AudioManager.m_sQueueSample.m_nPriority = 3;
AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nVolume;
AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
AudioManager.m_sQueueSample.m_nLoopCount = 1;
@@ -6129,31 +6132,31 @@ cPedComments::Process()
case SFX_POLICE_HELI_28:
case SFX_POLICE_HELI_29:
#endif
- AudioManager.m_sQueueSample.m_SoundIntensity = 400.0f;
+ AudioManager.m_sQueueSample.m_MaxDistance = 400.0f;
break;
default:
- AudioManager.m_sQueueSample.m_SoundIntensity = 50.0f;
+ AudioManager.m_sQueueSample.m_MaxDistance = 50.0f;
break;
}
- AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bStatic = TRUE;
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
if (sampleIndex >= SFX_AMMU_D && sampleIndex <= SFX_AMMU_F) {
- AudioManager.m_sQueueSample.m_bReverbFlag = FALSE;
+ AudioManager.m_sQueueSample.m_bReverb = FALSE;
#ifdef AUDIO_REFLECTIONS
- AudioManager.m_sQueueSample.m_bRequireReflection = FALSE;
+ AudioManager.m_sQueueSample.m_bReflections = FALSE;
#endif
#ifdef FIX_BUGS
} else if (sampleIndex >= SFX_POLICE_HELI_1 && sampleIndex <= SFX_POLICE_HELI_29) {
- AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bReverb = TRUE;
#ifdef AUDIO_REFLECTIONS
- AudioManager.m_sQueueSample.m_bRequireReflection = FALSE;
+ AudioManager.m_sQueueSample.m_bReflections = FALSE;
#endif // AUDIO_REFLECTIONS
#endif // FIX_BUGS
} else {
- AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bReverb = TRUE;
#ifdef AUDIO_REFLECTIONS
- AudioManager.m_sQueueSample.m_bRequireReflection = TRUE;
+ AudioManager.m_sQueueSample.m_bReflections = TRUE;
#endif
}
@@ -6208,53 +6211,53 @@ cAudioManager::ProcessExplosions(int32 explosion)
case EXPLOSION_ROCKET:
case EXPLOSION_BARREL:
case EXPLOSION_TANK_GRENADE:
- m_sQueueSample.m_SoundIntensity = 400.0f;
+ m_sQueueSample.m_MaxDistance = 400.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
case EXPLOSION_MOLOTOV:
- m_sQueueSample.m_SoundIntensity = 200.0f;
+ m_sQueueSample.m_MaxDistance = 200.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_3;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
- m_sQueueSample.m_SoundIntensity = 300.0f;
+ m_sQueueSample.m_MaxDistance = 300.0f;
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
default:
- m_sQueueSample.m_SoundIntensity = 400.0f;
+ m_sQueueSample.m_MaxDistance = 400.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
if (type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
break;
}
pos = CExplosion::GetExplosionPosition(i);
m_sQueueSample.m_vecPos = *pos;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_EMITTING_VOLUME(MAX_VOLUME);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
@@ -6276,53 +6279,53 @@ cAudioManager::ProcessFires(int32)
if (entity) {
switch (entity->GetType()) {
case ENTITY_TYPE_BUILDING:
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
emittingVol = 100;
m_sQueueSample.m_nFrequency = 8 * SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE) / 10;
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nPriority = 6;
break;
case ENTITY_TYPE_PED:
- m_sQueueSample.m_SoundIntensity = 25.0f;
+ m_sQueueSample.m_MaxDistance = 25.0f;
m_sQueueSample.m_nSampleIndex = SFX_PED_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE);
emittingVol = 60;
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
break;
default:
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
emittingVol = 80;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nPriority = 8;
}
} else {
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
emittingVol = 80;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nPriority = 8;
}
m_sQueueSample.m_vecPos = gFireManager.m_aFires[i].m_vecPos;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 10;
+ m_sQueueSample.m_nFramesToPlay = 10;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -6345,27 +6348,27 @@ cAudioManager::ProcessWaterCannon(int32)
#ifdef FIX_BUGS
m_sQueueSample.m_nVolume = ComputeVolume(50, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
#else
- m_sQueueSample.m_nVolume = ComputeVolume(50, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(50, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
#endif
if (m_sQueueSample.m_nVolume > 0) {
#ifdef FIX_BUGS
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
#else
- m_sQueueSample.m_SoundIntensity = SQR(SOUND_INTENSITY);
+ m_sQueueSample.m_MaxDistance = SQR(SOUND_INTENSITY);
#endif
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 15591;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_nFramesToPlay = 8;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
SET_EMITTING_VOLUME(50);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -6419,14 +6422,14 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
}
case SCRIPT_SOUND_GATE_START_CLUNK:
case SCRIPT_SOUND_GATE_STOP_CLUNK:
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_COL_GATE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
if (sound == SCRIPT_SOUND_GATE_START_CLUNK)
m_sQueueSample.m_nFrequency = 10600;
else
m_sQueueSample.m_nFrequency = 9000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
@@ -6435,12 +6438,12 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
case SCRIPT_SOUND_BULLET_HIT_GROUND_2:
case SCRIPT_SOUND_BULLET_HIT_GROUND_3:
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[iSound % 5] % 3 + SFX_BULLET_WALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 90;
@@ -6449,108 +6452,108 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2:
if (!SampleManager.IsSampleBankLoaded(SFX_BANK_TRAIN))
return;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_STATION_ANNOUNCE;
m_sQueueSample.m_nBankIndex = SFX_BANK_TRAIN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_PHONE_RING;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(FALSE);
break;
case SCRIPT_SOUND_GLASS_BREAK_L:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_BREAK_S:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_CRACK:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
break;
case SCRIPT_SOUND_GLASS_LIGHT_BREAK:
- m_sQueueSample.m_SoundIntensity = 55.0f;
+ m_sQueueSample.m_MaxDistance = 55.0f;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[4] & 3) + SFX_GLASS_SHARD_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000;
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = RandomDisplacement(11) + 25;
break;
case SCRIPT_SOUND_BOX_DESTROYED_1:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_WOODEN_BOX_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_BOX_DESTROYED_2:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_CARDBOARD_BOX_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_METAL_COLLISION:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 5 + SFX_COL_CAR_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 30 + 70;
break;
case SCRIPT_SOUND_TIRE_COLLISION:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
@@ -6570,22 +6573,22 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SURFACE_HEDGE:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.m_nReleasingVolumeModificator = 18;
+ m_sQueueSample.m_nPriority = 18;
break;
case SURFACE_WATER:
return;
default:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(750) + 18000;
- m_sQueueSample.m_nReleasingVolumeModificator = 15;
+ m_sQueueSample.m_nPriority = 15;
break;
}
} else {
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(750) + 18000;
- m_sQueueSample.m_nReleasingVolumeModificator = 15;
+ m_sQueueSample.m_nPriority = 15;
}
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
@@ -6594,8 +6597,8 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SCRIPT_SOUND_GUNSHELL_DROP_SOFT:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.m_nReleasingVolumeModificator = 18;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_nPriority = 18;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
@@ -6606,16 +6609,16 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_EMITTING_VOLUME(emittingVolume);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -6629,303 +6632,303 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_PARTY_1_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_5;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_5;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_6;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_6;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_7;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_7;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_8;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_8;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_9;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_9;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_10;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_10;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_11;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_11;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_12;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_12;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_RAGGA;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_RAGGA;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_WORK_SHOP_LOOP_S:
@@ -6937,23 +6940,23 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessSawMillScriptObject(sound);
return;
case SCRIPT_SOUND_38:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOG_FOOD_FACTORY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 6;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_39:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOG_FOOD_FACTORY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 6;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_LAUNDERETTE_LOOP_S:
@@ -6961,83 +6964,83 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessLaunderetteScriptObject(sound);
return;
case SCRIPT_SOUND_CHINATOWN_RESTAURANT_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_CHINATOWN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CHINATOWN_RESTAURANT_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_CHINATOWN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_ITALY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_ITALY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_46_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_1;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_47_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_1;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_2;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_2;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_AIRPORT_LOOP_S:
@@ -7061,23 +7064,23 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessHomeScriptObject(sound);
return;
case SCRIPT_SOUND_FRANKIE_PIANO:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_PIANO_BAR_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PIANO_BAR;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PIANO_BAR_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_1_S:
@@ -7091,63 +7094,63 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessPornCinema(sound);
return;
case SCRIPT_SOUND_BANK_ALARM_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BANK_ALARM;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_BANK_ALARM_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BANK_ALARM;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_POLICE_BALL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_POLICE_BALL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_INDUSTRIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_INDUSTRIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S:
@@ -7156,54 +7159,54 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
return;
case SCRIPT_SOUND_RAVE_1_LOOP_S:
case SCRIPT_SOUND_RAVE_2_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_COMMERCIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_1_LOOP_L:
case SCRIPT_SOUND_RAVE_2_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_COMMERCIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_SUBURBAN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_SUBURBAN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PRETEND_FIRE_LOOP:
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
- m_sQueueSample.m_nReleasingVolumeDivider = 10;
+ m_sQueueSample.m_nPriority = 8;
+ m_sQueueSample.m_nFramesToPlay = 10;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
default:
@@ -7211,15 +7214,15 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
SET_SOUND_REFLECTION(FALSE);
@@ -7243,58 +7246,58 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_1;
sample = SFX_PORN_1_GROAN_1;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_1_L:
case SCRIPT_SOUND_MISTY_SEX_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_1;
sample = SFX_PORN_1_GROAN_1;
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_2;
sample = SFX_PORN_2_GROAN_1;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_2;
sample = SFX_PORN_2_GROAN_1;
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
case SCRIPT_SOUND_PORN_CINEMA_3_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_3_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_3;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 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_nBankIndex = SFX_BANK_BUILDING_PORN_3;
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
sample = SFX_PORN_3_GROAN_1;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
if (sound != SCRIPT_SOUND_MISTY_SEX_S && sound != SCRIPT_SOUND_MISTY_SEX_L) {
- m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(MAX_VOLUME);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -7302,7 +7305,7 @@ cAudioManager::ProcessPornCinema(uint8 sound)
time = CTimer::GetTimeInMilliseconds();
if (time > gPornNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(90, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(90, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + sample;
@@ -7311,14 +7314,14 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nCounter = rand + 1;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 6;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
#ifdef FIX_BUGS
SET_EMITTING_VOLUME(90);
#endif
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gPornNextTime = time + 2000 + m_anRandomTable[3] % 6000;
@@ -7335,15 +7338,15 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_WORK_SHOP_LOOP_S:
case SCRIPT_SOUND_WORK_SHOP_LOOP_L:
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_WORKSHOP_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_WORKSHOP;
@@ -7351,12 +7354,12 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(30);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -7373,15 +7376,15 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_SAWMILL_LOOP_S:
case SCRIPT_SOUND_SAWMILL_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
@@ -7389,18 +7392,18 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(30);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
if (time > gSawMillNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_CUT_WOOD;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
@@ -7408,14 +7411,14 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
#ifdef FIX_BUGS
SET_EMITTING_VOLUME(70);
#endif
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gSawMillNextTime = time + 2000 + m_anRandomTable[3] % 4000;
@@ -7430,15 +7433,15 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_LAUNDERETTE_LOOP_S:
case SCRIPT_SOUND_LAUNDERETTE_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(45, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(45, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
@@ -7446,16 +7449,16 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(45);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_SONG_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
@@ -7463,12 +7466,12 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(110);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -7485,15 +7488,15 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_SHOP_LOOP_S:
case SCRIPT_SOUND_SHOP_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SHOP_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SHOP;
@@ -7501,18 +7504,18 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(30);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
if (time > gShopNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + SFX_SHOP_TILL_1;
@@ -7521,12 +7524,12 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = rand + 1;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(70);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gShopNextTime = time + 3000 + m_anRandomTable[3] % 7000;
@@ -7544,18 +7547,18 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
if (time > gAirportNextTime) {
switch (sound) {
case SCRIPT_SOUND_AIRPORT_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_AIRPORT_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_AIRPORT_ANNOUNCEMENT_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_AIRPORT;
@@ -7563,12 +7566,12 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(110);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gAirportNextTime = time + 10000 + m_anRandomTable[3] % 20000;
@@ -7588,19 +7591,19 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
if (time > gCinemaNextTime) {
switch (sound) {
case SCRIPT_SOUND_CINEMA_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_CINEMA_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
rand = m_anRandomTable[0] % 90 + 30;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = iSound % 3 + SFX_CINEMA_BASS_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CINEMA;
@@ -7609,12 +7612,12 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(rand);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gCinemaNextTime = time + 1000 + m_anRandomTable[3] % 4000;
@@ -7636,19 +7639,19 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
if (time > gDocksNextTime) {
switch (sound) {
case SCRIPT_SOUND_DOCKS_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_DOCKS_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
rand = m_anRandomTable[0] % 60 + 40;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_DOCKS_FOGHORN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOCKS;
@@ -7657,12 +7660,12 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
SET_EMITTING_VOLUME(rand);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gDocksNextTime = time + 10000 + m_anRandomTable[3] % 40000;
@@ -7683,19 +7686,19 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
if (time > gHomeNextTime) {
switch (sound) {
case SCRIPT_SOUND_HOME_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_HOME_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
dist = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (dist < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (dist < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(dist);
rand = m_anRandomTable[0] % 30 + 40;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 5 + SFX_HOME_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_HOME;
@@ -7704,12 +7707,12 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
SET_EMITTING_VOLUME(rand);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
gHomeNextTime = time + 1000 + m_anRandomTable[3] % 4000;
@@ -7730,16 +7733,16 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
if (time > gCellNextTime) {
switch (sound) {
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L:
- m_sQueueSample.m_SoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
if (m_FrameCounter & 1)
sampleIndex = (m_anRandomTable[1] & 3) + SFX_FIGHT_1;
@@ -7747,7 +7750,7 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
sampleIndex = (m_anRandomTable[3] & 1) + SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nSampleIndex = sampleIndex;
emittingVol = m_anRandomTable[0] % 50 + 55;
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
@@ -7755,12 +7758,12 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
SET_EMITTING_VOLUME(emittingVol);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
cPedParams params;
@@ -7800,14 +7803,14 @@ cAudioManager::ProcessWeather(int32 id)
if (iSound == 4)
iSound = 0;
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nOffset = (m_anRandomTable[2] & 15) + 55;
+ m_sQueueSample.m_nPriority = 0;
+ m_sQueueSample.m_nPan = (m_anRandomTable[2] & 15) + 55;
m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
RESET_LOOP_OFFSETS
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bReverb = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -7817,13 +7820,13 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nVolume = (uint8)(25.0f * CWeather::Rain);
m_sQueueSample.m_nCounter = 4;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nOffset = 63;
+ m_sQueueSample.m_nPriority = 0;
+ m_sQueueSample.m_nPan = 63;
m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 30;
+ m_sQueueSample.m_bReverb = FALSE;
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
SET_SOUND_REFLECTION(FALSE);
@@ -7994,23 +7997,23 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nVolume = 110;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nBankIndex = frontendBank ? SFX_BANK_FRONT_END_MENU : SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_bIs2D = TRUE;
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
RESET_LOOP_OFFSETS
if (stereo)
- m_sQueueSample.m_nOffset = m_anRandomTable[0] & 31;
+ m_sQueueSample.m_nPan = m_anRandomTable[0] & 31;
else
- m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_nPan = 63;
+ m_sQueueSample.m_bReverb = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
if (stereo) {
++m_sQueueSample.m_nSampleIndex;
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_nOffset = 127 - m_sQueueSample.m_nOffset;
+ m_sQueueSample.m_nPan = 127 - m_sQueueSample.m_nPan;
AddSampleToRequestedQueue();
}
}
@@ -8037,16 +8040,16 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nSampleIndex = SFX_CRANE_MAGNET;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = 6000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(100);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_SoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -8055,8 +8058,8 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COL_CAR_2);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
@@ -8079,38 +8082,38 @@ cAudioManager::ProcessProjectiles()
switch (CProjectileInfo::GetProjectileInfo(i)->m_eWeaponType) {
case WEAPONTYPE_ROCKETLAUNCHER:
emittingVol = MAX_VOLUME;
- m_sQueueSample.m_SoundIntensity = rocketLauncherIntensity;
+ m_sQueueSample.m_MaxDistance = rocketLauncherIntensity;
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_FLY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
break;
case WEAPONTYPE_MOLOTOV:
emittingVol = molotovVolume;
- m_sQueueSample.m_SoundIntensity = molotovIntensity;
+ m_sQueueSample.m_MaxDistance = molotovIntensity;
m_sQueueSample.m_nSampleIndex = SFX_PED_ON_FIRE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 32 * SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE) / 25;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
break;
default:
return;
}
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_vecPos = CProjectileInfo::ms_apProjectile[i]->GetPosition();
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_SoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -8160,7 +8163,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
@@ -8171,8 +8174,8 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bStatic = FALSE;
}
} else {
m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP;
@@ -8180,18 +8183,18 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bStatic = FALSE;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
SET_EMITTING_VOLUME(90);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -8217,13 +8220,13 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = 18000;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_nPriority = 4;
SET_EMITTING_VOLUME(60);
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bReverb = TRUE;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
m_sQueueSample.m_nCounter = iSound++;
@@ -8258,16 +8261,16 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_nPriority = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(40);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -8317,16 +8320,16 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(100);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = 450.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = 450.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
+ m_sQueueSample.m_bReverb = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -8343,16 +8346,16 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; // todo check sfx name
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(MAX_VOLUME);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8377,15 +8380,15 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 1;
SET_EMITTING_VOLUME(MAX_VOLUME);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index a288ac12..1df4681c 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -19,7 +19,7 @@ cAudioManager AudioManager;
cAudioManager::cAudioManager()
{
m_bIsInitialised = FALSE;
- m_bReverb = TRUE;
+ m_bIsSurround = TRUE;
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
m_nTimeSpent = TIME_SPENT;
m_nActiveSamples = NUM_CHANNELS_GENERIC;
@@ -40,7 +40,7 @@ cAudioManager::cAudioManager()
}
m_nAudioEntitiesTotal = 0;
m_FrameCounter = 0;
- m_bFifthFrameFlag = FALSE;
+ m_bReduceReleasingPriority = FALSE;
m_bTimerJustReset = FALSE;
m_nTimer = 0;
}
@@ -473,7 +473,7 @@ cAudioManager::ServiceSoundEffects()
#ifdef FIX_BUGS
if(CTimer::GetLogicalFramesPassed() != 0)
#endif
- m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
+ m_bReduceReleasingPriority = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
for (int32 i = 0; i < NUM_CHANNELS; i++)
SampleManager.StopChannel(i);
@@ -523,14 +523,14 @@ cAudioManager::FL(float f)
}
uint8
-cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance)
+cAudioManager::ComputeVolume(uint8 emittingVolume, float maxDistance, float distance)
{
- float newSoundIntensity;
- if (soundIntensity <= 0.0f)
+ float minDistance;
+ if (maxDistance <= 0.0f)
return 0;
- newSoundIntensity = soundIntensity / 5.0f;
- if (newSoundIntensity <= distance)
- emittingVolume = sq((soundIntensity - newSoundIntensity - (distance - newSoundIntensity)) / (soundIntensity - newSoundIntensity)) * emittingVolume;
+ minDistance = maxDistance / 5.0f;
+ if (minDistance <= distance)
+ emittingVolume = sq((maxDistance - minDistance - (distance - minDistance)) / (maxDistance - minDistance)) * emittingVolume;
return emittingVolume;
}
@@ -605,39 +605,47 @@ cAudioManager::InterrogateAudioEntities()
void
cAudioManager::AddSampleToRequestedQueue()
{
- uint32 calculatedVolume;
+ uint32 finalPriority;
uint8 sampleIndex;
#ifdef AUDIO_REFLECTIONS
bool8 bReflections;
#endif
if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
- calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume);
+ finalPriority = m_sQueueSample.m_nPriority * (MAX_VOLUME - m_sQueueSample.m_nVolume);
sampleIndex = m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
if (sampleIndex >= m_nActiveSamples) {
sampleIndex = m_abSampleQueueIndexTable[m_nActiveSampleQueue][m_nActiveSamples - 1];
- if (m_asSamples[m_nActiveSampleQueue][sampleIndex].m_nCalculatedVolume <= calculatedVolume)
+ if (m_asSamples[m_nActiveSampleQueue][sampleIndex].m_nFinalPriority <= finalPriority)
return;
} else {
++m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
}
- m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
- m_sQueueSample.m_bLoopEnded = FALSE;
+#if GTA_VERSION < GTA3_PC_10
+ if (m_sQueueSample.m_bStatic) {
+ if (m_sQueueSample.m_nLoopCount > 0)
+ m_sQueueSample.unk = m_nTimeSpent * SampleManager.GetSampleLength(m_sQueueSample.m_nSampleIndex) / m_sQueueSample.m_nFrequency;
+ else
+ m_sQueueSample.unk = -3;
+ }
+#endif
+ m_sQueueSample.m_nFinalPriority = finalPriority;
+ m_sQueueSample.m_bIsPlayingFinished = FALSE;
#ifdef AUDIO_REFLECTIONS
if (m_sQueueSample.m_bIs2D) {
- m_sQueueSample.m_bRequireReflection = FALSE;
- m_sQueueSample.m_nLoopsRemaining = 0;
+ m_sQueueSample.m_bReflections = FALSE;
+ m_sQueueSample.m_nReflectionDelay = 0;
}
if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount > 0) {
- bReflections = m_sQueueSample.m_bRequireReflection;
+ bReflections = m_sQueueSample.m_bReflections;
} else {
bReflections = FALSE;
- m_sQueueSample.m_nLoopsRemaining = 0;
+ m_sQueueSample.m_nReflectionDelay = 0;
}
- m_sQueueSample.m_bRequireReflection = FALSE;
+ m_sQueueSample.m_bReflections = FALSE;
if (!m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bReverbFlag = FALSE;
+ m_sQueueSample.m_bReverb = FALSE;
#endif
m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample;
@@ -656,8 +664,8 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
uint32 i = 0;
if (sample != 0) {
for (; i < sample; i++) {
- if (m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]].m_nCalculatedVolume >
- m_asSamples[m_nActiveSampleQueue][sample].m_nCalculatedVolume)
+ if (m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]].m_nFinalPriority >
+ m_asSamples[m_nActiveSampleQueue][sample].m_nFinalPriority)
break;
}
if (i < sample) {
@@ -677,12 +685,12 @@ cAudioManager::AddReflectionsToRequestedQueue()
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
reflectionDistance = m_afReflectionsDistances[i];
- if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_SoundIntensity) {
- m_sQueueSample.m_nLoopsRemaining = (reflectionDistance * 500.f / 1029.f);
- if (m_sQueueSample.m_nLoopsRemaining > 5) {
+ if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) {
+ m_sQueueSample.m_nReflectionDelay = (reflectionDistance * 500.f / 1029.f);
+ if (m_sQueueSample.m_nReflectionDelay > 5) {
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
SET_EMITTING_VOLUME(emittingVolume);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_SoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
m_sQueueSample.m_nCounter += (i + 1) * 256;
if (m_sQueueSample.m_nLoopCount > 0) {
@@ -692,7 +700,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
else
m_sQueueSample.m_nFrequency += noise;
}
- m_sQueueSample.m_nReleasingVolumeModificator += 20;
+ m_sQueueSample.m_nPriority += 20;
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
AddSampleToRequestedQueue();
}
@@ -766,7 +774,7 @@ cAudioManager::AddReleasingSounds()
for (int32 i = 0; i < m_SampleRequestQueuesStatus[queue]; i++) {
tSound &sample = m_asSamples[queue][m_abSampleQueueIndexTable[queue][i]];
- if (sample.m_bLoopEnded)
+ if (sample.m_bIsPlayingFinished)
continue;
toProcess[i] = FALSE;
@@ -779,32 +787,44 @@ cAudioManager::AddReleasingSounds()
}
if (!toProcess[i]) {
#ifdef AUDIO_REFLECTIONS
- if (sample.m_nCounter <= 255 || sample.m_nLoopsRemaining == 0) // check if not reflection
+ if (sample.m_nCounter <= 255 || sample.m_nReflectionDelay == 0) // check if not delayed reflection
#endif
{
- if (sample.m_nReleasingVolumeDivider == 0)
+ if (sample.m_nFramesToPlay == 0)
continue;
if (sample.m_nLoopCount == 0) {
if (sample.m_nVolumeChange == -1) {
- sample.m_nVolumeChange = sample.m_nVolume / sample.m_nReleasingVolumeDivider;
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ sample.m_nVolumeChange = sample.m_nEmittingVolume / sample.m_nFramesToPlay;
+#else
+ sample.m_nVolumeChange = sample.m_nVolume / sample.m_nFramesToPlay;
+#endif
if (sample.m_nVolumeChange <= 0)
sample.m_nVolumeChange = 1;
}
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ if (sample.m_nEmittingVolume <= sample.m_nVolumeChange) {
+#else
if (sample.m_nVolume <= sample.m_nVolumeChange) {
- sample.m_nReleasingVolumeDivider = 0;
+#endif
+ sample.m_nFramesToPlay = 0;
continue;
}
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ sample.m_nEmittingVolume -= sample.m_nVolumeChange;
+#else
sample.m_nVolume -= sample.m_nVolumeChange;
+#endif
}
#ifdef FIX_BUGS
if(CTimer::GetLogicalFramesPassed() != 0)
#endif
- --sample.m_nReleasingVolumeDivider;
- if (m_bFifthFrameFlag) {
- if (sample.m_nReleasingVolumeModificator < 20)
- ++sample.m_nReleasingVolumeModificator;
+ --sample.m_nFramesToPlay;
+ if (m_bReduceReleasingPriority) {
+ if (sample.m_nPriority < 20)
+ ++sample.m_nPriority;
}
- sample.m_bReleasingSoundFlag = 0;
+ sample.m_bStatic = FALSE;
}
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
AddSampleToRequestedQueue();
@@ -834,8 +854,8 @@ cAudioManager::ProcessActiveQueues()
CVector position;
for (int32 i = 0; i < m_nActiveSamples; i++) {
- m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = FALSE;
- m_asActiveSamples[i].m_bIsProcessed = FALSE;
+ m_asSamples[m_nActiveSampleQueue][i].m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[i].m_bIsBeingPlayed = FALSE;
}
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
@@ -845,23 +865,30 @@ cAudioManager::ProcessActiveQueues()
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex && sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
if (sample.m_nLoopCount > 0) {
+#if GTA_VERSION >= GTA3_PC_10
if (m_FrameCounter & 1)
flag = !!(j & 1);
else
flag = !(j & 1);
-
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
- sample.m_bLoopEnded = TRUE;
- m_asActiveSamples[j].m_bLoopEnded = TRUE;
+#else
+ if (m_asActiveSamples[j].unk != 0)
+ m_asActiveSamples[j].unk--;
+ else if (SampleManager.GetChannelUsedFlag(j))
+ m_asActiveSamples[j].unk = m_nTimeSpent * SampleManager.GetSampleLength(m_asActiveSamples[j].m_nSampleIndex) / m_asActiveSamples[j].m_nFrequency;
+ else {
+#endif
+ sample.m_bIsPlayingFinished = TRUE;
+ m_asActiveSamples[j].m_bIsPlayingFinished = TRUE;
m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
continue;
}
}
- sample.m_bIsProcessed = TRUE;
- m_asActiveSamples[j].m_bIsProcessed = TRUE;
+ sample.m_bIsBeingPlayed = TRUE;
+ m_asActiveSamples[j].m_bIsBeingPlayed = TRUE;
sample.m_nVolumeChange = -1;
- if (!sample.m_bReleasingSoundFlag) {
+ if (!sample.m_bStatic) {
if (sample.m_bIs2D) {
#ifdef EXTERNAL_3D_SOUND
emittingVol = m_bDoubleVolume ? 2 * Min(63, sample.m_nEmittingVolume) : sample.m_nEmittingVolume;
@@ -872,7 +899,7 @@ cAudioManager::ProcessActiveQueues()
#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(j, emittingVol);
#else
- SampleManager.SetChannelPan(j, sample.m_nOffset);
+ SampleManager.SetChannelPan(j, sample.m_nPan);
SampleManager.SetChannelVolume(j, sample.m_nVolume);
#endif
} else {
@@ -902,23 +929,23 @@ cAudioManager::ProcessActiveQueues()
TranslateEntity(&sample.m_vecPos, &position);
#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannel3DPosition(j, position.x, position.y, position.z);
- SampleManager.SetChannel3DDistances(j, sample.m_SoundIntensity, 0.25f * sample.m_SoundIntensity);
+ SampleManager.SetChannel3DDistances(j, sample.m_MaxDistance, 0.25f * sample.m_MaxDistance);
#else
- sample.m_nOffset = ComputePan(sample.m_fDistance, &position);
- SampleManager.SetChannelPan(j, sample.m_nOffset);
+ sample.m_nPan = ComputePan(sample.m_fDistance, &position);
+ SampleManager.SetChannelPan(j, sample.m_nPan);
#endif
}
- SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
+ SampleManager.SetChannelReverbFlag(j, sample.m_bReverb);
break;
}
- sample.m_bIsProcessed = FALSE;
- m_asActiveSamples[j].m_bIsProcessed = FALSE;
+ sample.m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[j].m_bIsBeingPlayed = FALSE;
}
}
}
}
for (int32 i = 0; i < m_nActiveSamples; i++) {
- if (m_asActiveSamples[i].m_nSampleIndex != NO_SAMPLE && !m_asActiveSamples[i].m_bIsProcessed) {
+ if (m_asActiveSamples[i].m_nSampleIndex != NO_SAMPLE && !m_asActiveSamples[i].m_bIsBeingPlayed) {
SampleManager.StopChannel(i);
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
@@ -926,28 +953,28 @@ cAudioManager::ProcessActiveQueues()
}
for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
- if (!sample.m_bIsProcessed && !sample.m_bLoopEnded && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
+ if (!sample.m_bIsBeingPlayed && !sample.m_bIsPlayingFinished && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
#ifdef AUDIO_REFLECTIONS
- if (sample.m_nCounter > 255 && sample.m_nLoopCount > 0 && sample.m_nLoopsRemaining > 0) { // check if reflection
- sample.m_nLoopsRemaining--;
- sample.m_nReleasingVolumeDivider = 1;
+ if (sample.m_nCounter > 255 && sample.m_nLoopCount > 0 && sample.m_nReflectionDelay > 0) { // check if reflection
+ sample.m_nReflectionDelay--;
+ sample.m_nFramesToPlay = 1;
} else
#endif
{
for (uint8 j = 0; j < m_nActiveSamples; j++) {
- if (!m_asActiveSamples[j].m_bIsProcessed) {
+ if (!m_asActiveSamples[j].m_bIsBeingPlayed) {
if (sample.m_nLoopCount > 0) {
samplesPerFrame = sample.m_nFrequency / m_nTimeSpent;
samplesToPlay = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
if (samplesPerFrame == 0)
continue;
- sample.m_nReleasingVolumeDivider = samplesToPlay / samplesPerFrame + 1;
+ sample.m_nFramesToPlay = samplesToPlay / samplesPerFrame + 1;
}
memcpy(&m_asActiveSamples[j], &sample, sizeof(tSound));
if (!m_asActiveSamples[j].m_bIs2D) {
TranslateEntity(&m_asActiveSamples[j].m_vecPos, &position);
#ifndef EXTERNAL_3D_SOUND
- m_asActiveSamples[j].m_nOffset = ComputePan(m_asActiveSamples[j].m_fDistance, &position);
+ m_asActiveSamples[j].m_nPan = ComputePan(m_asActiveSamples[j].m_fDistance, &position);
#endif
}
#ifdef EXTERNAL_3D_SOUND
@@ -966,16 +993,16 @@ cAudioManager::ProcessActiveQueues()
SampleManager.SetChannelEmittingVolume(j, emittingVol);
#else
SampleManager.SetChannelVolume(j, emittingVol);
- SampleManager.SetChannelPan(j, m_asActiveSamples[j].m_nOffset);
+ SampleManager.SetChannelPan(j, m_asActiveSamples[j].m_nPan);
#endif
#ifndef GTA_PS2
SampleManager.SetChannelLoopPoints(j, m_asActiveSamples[j].m_nLoopStart, m_asActiveSamples[j].m_nLoopEnd);
SampleManager.SetChannelLoopCount(j, m_asActiveSamples[j].m_nLoopCount);
#endif
- SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverbFlag);
+ SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverb);
#ifdef EXTERNAL_3D_SOUND
if (m_asActiveSamples[j].m_bIs2D) {
- uint8 offset = m_asActiveSamples[j].m_nOffset;
+ uint8 offset = m_asActiveSamples[j].m_nPan;
if (offset == 63)
x = 0.f;
else if (offset >= 63)
@@ -985,19 +1012,19 @@ cAudioManager::ProcessActiveQueues()
usedX = x;
usedY = 0.0f;
usedZ = 0.0f;
- m_asActiveSamples[j].m_SoundIntensity = 100000.0f;
+ m_asActiveSamples[j].m_MaxDistance = 100000.0f;
} else {
usedX = position.x;
usedY = position.y;
usedZ = position.z;
}
SampleManager.SetChannel3DPosition(j, usedX, usedY, usedZ);
- SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_SoundIntensity, 0.25f * m_asActiveSamples[j].m_SoundIntensity);
+ SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_MaxDistance, 0.25f * m_asActiveSamples[j].m_MaxDistance);
#endif
SampleManager.StartChannel(j);
}
- m_asActiveSamples[j].m_bIsProcessed = TRUE;
- sample.m_bIsProcessed = TRUE;
+ m_asActiveSamples[j].m_bIsBeingPlayed = TRUE;
+ sample.m_bIsBeingPlayed = TRUE;
sample.m_nVolumeChange = -1;
break;
}
@@ -1025,35 +1052,35 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_nBankIndex = INVALID_SFX_BANK;
m_asActiveSamples[i].m_bIs2D = FALSE;
- m_asActiveSamples[i].m_nReleasingVolumeModificator = 5;
+ m_asActiveSamples[i].m_nPriority = 5;
m_asActiveSamples[i].m_nFrequency = 0;
m_asActiveSamples[i].m_nVolume = 0;
#ifdef EXTERNAL_3D_SOUND
m_asActiveSamples[i].m_nEmittingVolume = 0;
#endif
m_asActiveSamples[i].m_fDistance = 0.0f;
- m_asActiveSamples[i].m_bIsProcessed = FALSE;
- m_asActiveSamples[i].m_bLoopEnded = FALSE;
+ m_asActiveSamples[i].m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[i].m_bIsPlayingFinished = FALSE;
m_asActiveSamples[i].m_nLoopCount = 1;
#ifndef GTA_PS2
m_asActiveSamples[i].m_nLoopStart = 0;
m_asActiveSamples[i].m_nLoopEnd = -1;
#endif
m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
- m_asActiveSamples[i].m_SoundIntensity = 200.0f;
- m_asActiveSamples[i].m_nOffset = 63;
- m_asActiveSamples[i].m_bReleasingSoundFlag = FALSE;
+ m_asActiveSamples[i].m_MaxDistance = 200.0f;
+ m_asActiveSamples[i].m_nPan = 63;
+ m_asActiveSamples[i].m_bStatic = FALSE;
#if GTA_VERSION < GTA3_PC_10
m_asActiveSamples[i].unk = -3;
#endif
- m_asActiveSamples[i].m_nCalculatedVolume = 0;
- m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
+ m_asActiveSamples[i].m_nFinalPriority = 0;
+ m_asActiveSamples[i].m_nFramesToPlay = 0;
m_asActiveSamples[i].m_nVolumeChange = -1;
m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f);
- m_asActiveSamples[i].m_bReverbFlag = FALSE;
+ m_asActiveSamples[i].m_bReverb = FALSE;
#ifdef AUDIO_REFLECTIONS
- m_asActiveSamples[i].m_nLoopsRemaining = 0;
- m_asActiveSamples[i].m_bRequireReflection = FALSE;
+ m_asActiveSamples[i].m_nReflectionDelay = 0;
+ m_asActiveSamples[i].m_bReflections = FALSE;
#endif
}
}
@@ -1081,7 +1108,7 @@ cAudioManager::AdjustSamplesVolume()
tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
if (!pSample->m_bIs2D)
- pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_SoundIntensity, pSample->m_fDistance);
+ pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_MaxDistance, pSample->m_fDistance);
}
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index ed920cab..662e929e 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -7,49 +7,59 @@
class tSound
{
public:
- int32 m_nEntityIndex;
+ int32 m_nEntityIndex; // audio entity index
#if GTA_VERSION >= GTA3_PC_10
- uint32 m_nCounter;
+ uint32 m_nCounter; // I'm not sure what this is but it looks like a virtual counter to determine the same sound in queue
+ // Values higher than 255 are used by reflections
#else
uint8 m_nCounter;
#endif
- uint32 m_nSampleIndex;
- uint8 m_nBankIndex;
- bool8 m_bIs2D;
- uint32 m_nReleasingVolumeModificator;
- uint32 m_nFrequency;
- uint8 m_nVolume;
- float m_fDistance;
- uint32 m_nLoopCount;
+ uint32 m_nSampleIndex; // An index of sample from AudioSamples.h
+ uint8 m_nBankIndex; // A sound bank index. IDK what's the point of it here since samples are hardcoded anyway
+ bool8 m_bIs2D; // If TRUE then sound is played in 2D space (such as frontend or police radio)
+ uint32 m_nPriority; // The multiplier for the sound priority (see m_nFinalPriority below). Lesser value means higher priority
+ uint32 m_nFrequency; // Sound frequency, plain and simple
+ uint8 m_nVolume; // Sound volume (0..127), only used as an actual volume without EXTERNAL_3D_SOUND (see m_nEmittingVolume)
+ float m_fDistance; // Distance to camera (useless if m_bIs2D == TRUE)
+ uint32 m_nLoopCount; // 0 - always loop, 1 - don't loop, other values never seen
#ifndef GTA_PS2
+ // Loop offsets
uint32 m_nLoopStart;
int32 m_nLoopEnd;
#endif
#ifdef EXTERNAL_3D_SOUND
- uint8 m_nEmittingVolume;
+ uint8 m_nEmittingVolume; // The volume in 3D space, provided to 3D audio engine
#endif
- float m_fSpeedMultiplier;
+ float m_fSpeedMultiplier; // Used for doppler effect. 0.0f - unaffected by doppler
#if GTA_VERSION >= GTA3_PC_10
- float m_SoundIntensity;
+ float m_MaxDistance; // The maximum distance at which sound could be heard. Minimum distance = MaxDistance / 5 or MaxDistance / 4 in case of emitting volume (useless if m_bIs2D == TRUE)
#else
- uint32 m_SoundIntensity;
+ uint32 m_MaxDistance;
#endif
- bool8 m_bReleasingSoundFlag;
- CVector m_vecPos;
- bool8 m_bReverbFlag;
+ bool8 m_bStatic; // If TRUE then sound parameters cannot be changed during playback (frequency, position, etc.)
+ CVector m_vecPos; // Position of sound in 3D space. Unused if m_bIs2D == TRUE
+ bool8 m_bReverb; // Toggles reverb effect
#ifdef AUDIO_REFLECTIONS
- uint8 m_nLoopsRemaining;
- bool8 m_bRequireReflection; // Used for oneshots
+ uint8 m_nReflectionDelay; // Number of frames before reflection could be played. This is calculated internally by AudioManager and shouldn't be set by queued sample
+ bool8 m_bReflections; // Add sound reflections
#endif
- uint8 m_nOffset;
- uint32 m_nReleasingVolumeDivider;
- bool8 m_bIsProcessed;
- bool8 m_bLoopEnded;
+ uint8 m_nPan; // Sound panning (0-127). Controls the volume of the playback coming from left and right speaker. Calculated internally unless m_bIs2D==TRUE.
+ // 0 = L 100% R 0%
+ // 63 = L 100% R 100%
+ // 127 = L 0% R 100%
+ uint32 m_nFramesToPlay; // Number of frames the sound would be played (if it stops being queued).
+ // This one is being set by queued sample for looping sounds, otherwise calculated inside AudioManager
+
+ // all fields below are internal to AudioManager calculations and aren't set by queued sample
+ bool8 m_bIsBeingPlayed; // Set to TRUE when the sound was added or changed on current frame to avoid it being overwritten
+ bool8 m_bIsPlayingFinished; // Not sure about the name. Set to TRUE when sampman channel becomes free
#if GTA_VERSION < GTA3_PC_10
- int32 unk; // only on PS2, seems unused
+ int32 unk; // Only on PS2, used by static non-looped sounds (AFAIK)
+ // Looks like it's keeping a number of frames left to play with the purpose of setting m_bIsPlayingFinished=TRUE once value reaches 0
+ // Default value is -3 for whatever reason
#endif
- uint32 m_nCalculatedVolume;
- int8 m_nVolumeChange;
+ uint32 m_nFinalPriority; // Actual value used to compare priority, calculated using volume and m_nPriority. Lesser value means higher priority
+ int8 m_nVolumeChange; // How much m_nVolume should reduce per each frame. Has no effect with EXTERNAL_3D_SOUND
};
VALIDATE_SIZE(tSound, 92);
@@ -208,8 +218,8 @@ class cAudioManager
{
public:
bool8 m_bIsInitialised;
- bool8 m_bReverb; // unused
- bool8 m_bFifthFrameFlag;
+ bool8 m_bIsSurround; // unused until VC
+ bool8 m_bReduceReleasingPriority;
uint8 m_nActiveSamples;
bool8 m_bDoubleVolume; // unused
#if GTA_VERSION >= GTA3_PC_10
@@ -288,7 +298,7 @@ public:
void ServiceSoundEffects();
uint32 FL(float f); // not used
- uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance);
+ uint8 ComputeVolume(uint8 emittingVolume, float maxDistance, float distance);
void TranslateEntity(Const CVector *v1, CVector *v2);
int32 ComputePan(float, CVector *);
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier); // inlined on PS2
@@ -309,7 +319,7 @@ public:
#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well
void AdjustSamplesVolume();
- uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist);
+ uint8 ComputeEmittingVolume(uint8 emittingVolume, float maxDistance, float dist);
#endif
// audio logic
@@ -553,7 +563,7 @@ public:
#define SET_EMITTING_VOLUME(vol)
#endif
#ifdef AUDIO_REFLECTIONS
-#define SET_SOUND_REFLECTION(b) m_sQueueSample.m_bRequireReflection = b
+#define SET_SOUND_REFLECTION(b) m_sQueueSample.m_bReflections = b
#else
#define SET_SOUND_REFLECTION(b)
#endif
diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp
index b1460b3c..76a87137 100644
--- a/src/audio/PolRadio.cpp
+++ b/src/audio/PolRadio.cpp
@@ -129,16 +129,16 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = TRUE;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nVolume = m_anRandomTable[2] % 20 + 15;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(SFX_POLICE_RADIO_CRACKLE)
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_bReverbFlag = FALSE;
- m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = FALSE;
+ m_sQueueSample.m_nPan = 63;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}