summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp1029
1 files changed, 516 insertions, 513 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index c61ec38d..c7605126 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -44,6 +44,9 @@
#include "Wanted.h"
#include "KeyGen.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
@@ -260,7 +263,7 @@ cAudioManager::ProcessReverb()
if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) {
#ifndef GTA_PS2
for (uint32 i = 0; i < numChannels; i++) {
- if (m_asActiveSamples[i].m_bReverbFlag)
+ if (m_asActiveSamples[i].m_bReverb)
SampleManager.SetChannelReverbFlag(i, TRUE);
}
#endif
@@ -921,14 +924,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
}
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
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 = 5;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -972,14 +975,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000 + freq;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
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 = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_MaxDistance = 140.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -997,14 +1000,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
freqFrontPrev = m_sQueueSample.m_nFrequency;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
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 = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_MaxDistance = 140.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1013,14 +1016,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
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 = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_MaxDistance = 140.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1057,14 +1060,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = (volumeModifier + 1) * 16000 + freq;
}
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
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 = 140.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_MaxDistance = 140.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1090,14 +1093,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nCounter = 12;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
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 = 30.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 30;
+ m_sQueueSample.m_MaxDistance = 30.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 30;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1125,14 +1128,14 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 12;
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(propellerSpeed * 100.0f);
SET_LOOP_OFFSETS(SFX_SEAPLANE_PRO4)
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
- m_sQueueSample.m_SoundIntensity = 20.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
+ m_sQueueSample.m_MaxDistance = 20.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1155,15 +1158,15 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA;
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 = (volumeModifier + 1.0f) * 16000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(volumeModifier * 25.0f);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_SoundIntensity = 27.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_MaxDistance = 27.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1201,14 +1204,14 @@ 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(emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REVERB(FALSE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1253,15 +1256,15 @@ 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.0f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVolume);
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_MaxDistance = reverseGearIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1310,15 +1313,15 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_CAR_RC_HELI;
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;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(70);
SET_LOOP_OFFSETS(SFX_CAR_RC_HELI)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1373,15 +1376,15 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_RC_REV;
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(volume);
SET_LOOP_OFFSETS(SFX_RC_REV)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1429,22 +1432,22 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
if (vehSlowdown) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_RC_IDLE;
- m_sQueueSample.m_nReleasingVolumeDivider = 6;
+ m_sQueueSample.m_nFramesToPlay = 6;
} else {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_RC_REV;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
+ m_sQueueSample.m_nFramesToPlay = 4;
}
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;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(volume);
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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1505,16 +1508,16 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
m_sQueueSample.m_nCounter = 95;
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_nSampleIndex = SFX_TYRE_BURST_L;
m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(SFX_TYRE_BURST_L)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1559,7 +1562,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;
@@ -1574,9 +1577,9 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1625,7 +1628,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;
@@ -1633,9 +1636,9 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1848,16 +1851,16 @@ 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;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_TRUCK || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_TRUCK)
m_sQueueSample.m_nFrequency /= 2;
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 = 8;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1911,19 +1914,19 @@ 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_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1941,15 +1944,15 @@ 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 = 4.0f;
- m_sQueueSample.m_SoundIntensity = 200.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = 200.0f;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -1961,15 +1964,15 @@ 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 = 3;
+ m_sQueueSample.m_nPriority = 3;
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 = 4.0f;
- m_sQueueSample.m_SoundIntensity = 90.0f;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = 90.0f;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2290,7 +2293,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
} 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)
@@ -2326,7 +2329,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 50.0f * 0.25f);
#else
SampleManager.SetChannelVolume(nChannel, ComputeVolume(120, 50.0f, m_sQueueSample.m_fDistance));
- SampleManager.SetChannelPan(nChannel, m_sQueueSample.m_nOffset);
+ SampleManager.SetChannelPan(nChannel, m_sQueueSample.m_nPan);
#endif
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
@@ -2469,14 +2472,14 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2570,7 +2573,7 @@ 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;
#ifdef FIX_BUGS
@@ -2580,9 +2583,9 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
#endif
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 = 4;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2656,14 +2659,14 @@ 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(volume);
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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2697,7 +2700,7 @@ 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;
#ifdef FIX_BUGS
@@ -2707,9 +2710,9 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
#endif
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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2747,13 +2750,13 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
@@ -2792,13 +2795,13 @@ 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(volume);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2833,12 +2836,12 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
if (health < 250.0f) {
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);
} else {
emittingVolume = 30;
m_sQueueSample.m_nSampleIndex = SFX_PALM_TREE_LO;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nFrequency = 27000;
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2853,9 +2856,9 @@ 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 = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2895,15 +2898,15 @@ 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(EMITTING_VOLUME);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -2968,9 +2971,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
else
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;
}
@@ -3008,9 +3011,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
else
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;
}
@@ -3022,9 +3025,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 68;
emittingVol = m_anRandomTable[1] % 30 + 80;
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:
case SOUND_CAR_JUMP_2: {
@@ -3050,9 +3053,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
if (params.m_VehicleType == VEHICLE_TYPE_BIKE)
m_sQueueSample.m_nFrequency *= 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_TYRE_POP: {
@@ -3065,9 +3068,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
WheelIndex = 91;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TYRE_BURST);
m_sQueueSample.m_nFrequency += RandomDisplacement(2000);
- 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] % 10 + 117;
break;
@@ -3083,9 +3086,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;
}
@@ -3096,9 +3099,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;
@@ -3114,9 +3117,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;
@@ -3127,10 +3130,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;
@@ -3143,9 +3146,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;
@@ -3165,9 +3168,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
if (WaveIndex > 46)
WaveIndex = 41;
m_sQueueSample.m_nFrequency = (7000.0f * 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 = (35.0f * relVol);
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -3178,7 +3181,7 @@ 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_fSoundIntensity = SOUND_INTENSITY;
emittingVol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
@@ -3193,9 +3196,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;
@@ -3210,10 +3213,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 79;
m_sQueueSample.m_nFrequency = (3000.0f * vol * 625.0f / 24.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.0f * vol * 625.0f / 24.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
noReflections = TRUE;
@@ -3225,9 +3228,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;
@@ -3239,9 +3242,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;
@@ -3261,9 +3264,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
HeliIndex = 89;
m_sQueueSample.m_nFrequency = (8000.0f * relVol) + 16000;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- 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;
break;
}
case SOUND_WEAPON_SHOT_FIRED: {
@@ -3308,9 +3311,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
GunIndex = 53;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M60_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- 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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -3362,9 +3365,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
#endif
- 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;
}
@@ -3378,9 +3381,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;
@@ -3394,9 +3397,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);
@@ -3434,9 +3437,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;
@@ -3449,9 +3452,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 48;
m_sQueueSample.m_nFrequency = RandomDisplacement(6000) + 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;
++CrunchOffset;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 20 + 55;
@@ -3471,9 +3474,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 50;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- 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;
}
@@ -3482,22 +3485,22 @@ 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);
SET_SOUND_REVERB(TRUE);
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_bIs2D = FALSE;
@@ -3505,7 +3508,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
} else m_sQueueSample.m_bIs2D = FALSE;
AddSampleToRequestedQueue();
if (stereo) {
- m_sQueueSample.m_nOffset = 127;
+ m_sQueueSample.m_nPan = 127;
m_sQueueSample.m_nSampleIndex++;
m_sQueueSample.m_nCounter = GunIndex++;
if (GunIndex > 58)
@@ -3545,15 +3548,15 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_TRAIN;
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);
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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3567,15 +3570,15 @@ 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_MaxDistance = SOUND_INTENSITY;
+ // m_sQueueSample.m_bStatic = FALSE;
+ // m_sQueueSample.m_nFramesToPlay = 3;
// SET_SOUND_REVERB(TRUE);
// SET_SOUND_REFLECTION(FALSE);
// AddSampleToRequestedQueue();
@@ -3690,14 +3693,14 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_BOAT_CRUISER_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_nLoopCount = 0;
SET_EMITTING_VOLUME(Vol);
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_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3714,14 +3717,14 @@ 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_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3760,15 +3763,15 @@ 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 = 6;
+ m_sQueueSample.m_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 6;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3927,15 +3930,15 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3958,15 +3961,15 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -3988,15 +3991,15 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -4017,15 +4020,15 @@ 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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -4047,23 +4050,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_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 12;
+ m_sQueueSample.m_nPan = 0;
SET_SOUND_REVERB(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;
@@ -4201,14 +4204,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:
@@ -4228,14 +4231,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_37:
@@ -4325,16 +4328,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:
@@ -4380,16 +4383,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
}
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
- 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;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -4404,17 +4407,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
#endif
m_sQueueSample.m_nCounter = 70;
m_sQueueSample.m_nFrequency = 27000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
maxDist = SQR(50);
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_IDLE)
SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
break;
case SOUND_WEAPON_CHAINSAW_ATTACK:
if (FindVehicleOfPlayer())
@@ -4427,17 +4430,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
#endif
m_sQueueSample.m_nCounter = 68;
m_sQueueSample.m_nFrequency = 27000;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK)
SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
break;
case SOUND_WEAPON_CHAINSAW_MADECONTACT:
if (FindVehicleOfPlayer())
@@ -4452,17 +4455,17 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
#endif
m_sQueueSample.m_nCounter = 68;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 22000;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK)
SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
break;
case SOUND_WEAPON_SHOT_FIRED:
weapon = ped->GetWeapon();
@@ -4477,16 +4480,16 @@ 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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4497,16 +4500,16 @@ 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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4517,16 +4520,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PYTHON_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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4538,16 +4541,16 @@ 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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4558,16 +4561,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SPAS12_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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4577,16 +4580,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 17000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
stereo = TRUE;
break;
case WEAPONTYPE_UZI:
@@ -4597,16 +4600,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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
stereo = TRUE;
break;
case WEAPONTYPE_SILENCED_INGRAM:
@@ -4615,16 +4618,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 34000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
stereo = TRUE;
break;
case WEAPONTYPE_MP5:
@@ -4634,16 +4637,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MP5_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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
stereo = TRUE;
break;
case WEAPONTYPE_M4:
@@ -4652,16 +4655,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nCounter = iSound++;
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 43150;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 90;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
stereo = TRUE;
break;
case WEAPONTYPE_RUGER:
@@ -4671,16 +4674,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RUGER_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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 90;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
stereo = TRUE;
break;
case WEAPONTYPE_SNIPERRIFLE:
@@ -4694,16 +4697,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
else
m_sQueueSample.m_nFrequency = 20182;
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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
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;
SET_SOUND_REFLECTION(TRUE);
stereo = TRUE;
break;
@@ -4713,16 +4716,16 @@ 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;
stereo = TRUE;
break;
case WEAPONTYPE_M60:
@@ -4733,16 +4736,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M60_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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
stereo = TRUE;
break;
default:
@@ -4791,15 +4794,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:
@@ -4854,16 +4857,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
break;
}
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 = 120.0f;
+ m_sQueueSample.m_MaxDistance = 120.0f;
maxDist = SQR(120);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 80;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -4873,16 +4876,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;
@@ -4891,16 +4894,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:
if (m_FrameCounter <= iSplashFrame)
@@ -4911,16 +4914,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;
case SOUND_MELEE_ATTACK_START:
@@ -4944,9 +4947,9 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
narrowSoundRange = TRUE;
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_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
if (weaponType == WEAPONTYPE_UNARMED || weaponType == WEAPONTYPE_BRASSKNUCKLE)
emittingVol = m_anRandomTable[1] % 10 + 35;
else
@@ -4956,7 +4959,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
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;
}
@@ -4973,16 +4976,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 1000 + 17000;
if (param2 == 0)
m_sQueueSample.m_nFrequency = (3 * m_sQueueSample.m_nFrequency) / 4;
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nPriority = 6;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
maxDist = SQR(20);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = (m_anRandomTable[2] % 20 + 70) * param1 / 127;
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
}
@@ -4991,50 +4994,50 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 68;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MINIGUN_FIRE_LEFT);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 150.0f;
+ m_sQueueSample.m_MaxDistance = 150.0f;
emittingVol = 127;
maxDist = SQR(150);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_LEFT)
SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
break;
case SOUND_WEAPON_MINIGUN_2:
m_sQueueSample.m_nSampleIndex = SFX_MINIGUN_FIRE_RIGHT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 69;
m_sQueueSample.m_nFrequency = 18569;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 150.0f;
+ m_sQueueSample.m_MaxDistance = 150.0f;
emittingVol = 127.0f * m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
maxDist = SQR(150);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_RIGHT)
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
break;
case SOUND_WEAPON_MINIGUN_3:
m_sQueueSample.m_nSampleIndex = SFX_MINIGUN_STOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 69;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_MINIGUN_STOP);
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_nPriority = 4;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_SoundIntensity = 150.0f;
+ m_sQueueSample.m_MaxDistance = 150.0f;
maxDist = SQR(150);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_SHIRT_WIND_FLAP:
@@ -5068,16 +5071,16 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 71;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_SoundIntensity = 15.0f;
+ m_sQueueSample.m_MaxDistance = 15.0f;
maxDist = SQR(15);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
}
}
continue;
@@ -5090,12 +5093,12 @@ 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;
}
@@ -5103,7 +5106,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
SET_SOUND_REVERB(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) {
@@ -8087,7 +8090,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;
@@ -8103,20 +8106,20 @@ cPedComments::Process()
#endif // FIX_BUGS
#endif // EXTERNAL_3D_SOUND
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- AudioManager.m_sQueueSample.m_SoundIntensity = 40.0f;
- AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ AudioManager.m_sQueueSample.m_MaxDistance = 40.0f;
+ AudioManager.m_sQueueSample.m_bStatic = TRUE;
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
#ifdef AUDIO_REVERB
- AudioManager.m_sQueueSample.m_bReverbFlag = TRUE;
+ AudioManager.m_sQueueSample.m_bReverb = TRUE;
#endif // AUDIO_REVERB
#ifdef AUDIO_REFLECTIONS
- AudioManager.m_sQueueSample.m_bRequireReflection = TRUE;
+ AudioManager.m_sQueueSample.m_bReflections = TRUE;
#endif // AUDIO_REFLECTIONS
AudioManager.m_sQueueSample.m_bIs2D = FALSE;
#ifdef FIX_BUGS
if (sampleIndex >= SFX_TONI_ANGRY_BUSTED_01 && sampleIndex <= SFX_TONI_WISECRACKING_SHOOT_26) { // check if player sfx
AudioManager.m_sQueueSample.m_bIs2D = TRUE;
- AudioManager.m_sQueueSample.m_nOffset = 63;
+ AudioManager.m_sQueueSample.m_nPan = 63;
}
#endif // FIX_BUGS
AudioManager.m_sQueueSample.m_nFrequency =
@@ -8181,37 +8184,37 @@ cAudioManager::ProcessExplosions(int32 explosion)
case EXPLOSION_ROCKET:
case EXPLOSION_BARREL:
case EXPLOSION_TANK_GRENADE:
- m_sQueueSample.m_SoundIntensity = 200.0f;
+ m_sQueueSample.m_MaxDistance = 200.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
SET_SOUND_REFLECTION(TRUE);
break;
case EXPLOSION_MOLOTOV:
- m_sQueueSample.m_SoundIntensity = 150.0f;
+ m_sQueueSample.m_MaxDistance = 150.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;
SET_SOUND_REFLECTION(FALSE);
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
- m_sQueueSample.m_SoundIntensity = 200.0f;
+ m_sQueueSample.m_MaxDistance = 200.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;
SET_SOUND_REFLECTION(TRUE);
break;
default:
- m_sQueueSample.m_SoundIntensity = 200.0f;
+ m_sQueueSample.m_MaxDistance = 200.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19500;
if (type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10; //same *= 8 / 10;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
#ifdef FIX_BUGS
SET_SOUND_REFLECTION(TRUE);
@@ -8220,15 +8223,15 @@ cAudioManager::ProcessExplosions(int32 explosion)
}
m_sQueueSample.m_vecPos = *CExplosion::GetExplosionPosition(i);
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_bStatic = TRUE;
SET_EMITTING_VOLUME(MAX_VOLUME);
RESET_LOOP_OFFSETS
SET_SOUND_REVERB(TRUE);
@@ -8252,49 +8255,49 @@ cAudioManager::ProcessFires(int32)
if (entity) {
switch (entity->GetType()) {
case ENTITY_TYPE_BUILDING:
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.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 = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.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 = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
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)
SET_SOUND_REVERB(TRUE);
@@ -8305,19 +8308,19 @@ cAudioManager::ProcessFires(int32)
if (gFireManager.m_aFires[i].m_bExtinguishedWithWater) {
gFireManager.m_aFires[i].m_bExtinguishedWithWater = FALSE;
emittingVol = 100.0f * gFireManager.m_aFires[i].m_fWaterExtinguishCountdown;
- 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_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nFrequency = 19591;
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_nCounter = i + 40;
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)
SET_SOUND_REVERB(TRUE);
@@ -8342,17 +8345,17 @@ cAudioManager::ProcessWaterCannon(int32)
m_sQueueSample.m_fDistance = Sqrt(distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(50, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
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)
SET_SOUND_REVERB(TRUE);
@@ -8394,24 +8397,24 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_POLICE_CELL_DOOR_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;
m_sQueueSample.m_nFrequency = 10600;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
break;
case SCRIPT_SOUND_GARAGE_DOOR_CLUNK:
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_PANEL_2; // huh?
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 22000;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_nPriority = 4;
emittingVolume = 60;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
@@ -8421,23 +8424,23 @@ 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;
break;
case SCRIPT_SOUND_WILLIE_CARD_SWIPE:
emittingVolume = 70;
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_BOMB_BEEP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 20159;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(FALSE);
@@ -8457,121 +8460,121 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
return;
}
case SCRIPT_SOUND_SEAPLANE_LOW_FUEL:
- m_sQueueSample.m_SoundIntensity = 1000.0f;
+ m_sQueueSample.m_MaxDistance = 1000.0f;
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_LOW;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 100;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_HORN_JEEP); // BUG?
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = TRUE;
SET_SOUND_REFLECTION(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);
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_HIT_BALL:
- m_sQueueSample.m_SoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_HIT_BALL;
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 = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bIs2D = FALSE;
SET_SOUND_REFLECTION(TRUE);
@@ -8592,22 +8595,22 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SURFACE_SAND_BEACH:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(600) + 10600;
- 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(1500) + 30000;
- 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(1500) + 30000;
- 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;
@@ -8616,8 +8619,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;
@@ -8628,13 +8631,13 @@ 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
SET_SOUND_REVERB(TRUE);
@@ -8651,91 +8654,91 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
switch(sound) {
case SCRIPT_SOUND_BANK_ALARM_LOOP:
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_BUILDINGS_BANK_ALARM;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BANK_ALARM;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BUILDINGS_BANK_ALARM);
- 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;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP:
case SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP:
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GARAGE_DOOR_LOOP);
- 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;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SNORING_LOOP:
- m_sQueueSample.m_SoundIntensity = 6.0f;
+ m_sQueueSample.m_MaxDistance = 6.0f;
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_SNORE;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SNORING;
emittingVolume = 25;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BUILDING_SNORE);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 6;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP:
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_TANK_TURRET;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TANK_TURRET);
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 4;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_1:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BAR_1;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_2:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BAR_2;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_3:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BAR_3;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_BAR_4:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BAR_4;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8744,11 +8747,11 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_MALIBU_1;
MusicManager.SetMalibuClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_MALIBU_1);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8757,11 +8760,11 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_MALIBU_2;
MusicManager.SetMalibuClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_MALIBU_2);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8770,11 +8773,11 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_MALIBU_3;
MusicManager.SetMalibuClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_MALIBU_3);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8783,11 +8786,11 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_1;
MusicManager.SetStripClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_STRIP_1);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8796,11 +8799,11 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_2;
MusicManager.SetStripClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_STRIP_2);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8809,33 +8812,33 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_3;
MusicManager.SetStripClubTrackPos(SCRIPT_SOUND_NEW_BUILDING_STRIP_3);
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_BUILDING_CHURCH:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_CHURCH;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CHURCH;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 15;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 15;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_NEW_WATERFALL:
emittingVolume = 30;
- m_sQueueSample.m_SoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 20812;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
- m_sQueueSample.m_nReleasingVolumeDivider = 9;
+ m_sQueueSample.m_nPriority = 4;
+ m_sQueueSample.m_nFramesToPlay = 9;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = FALSE;
break;
@@ -8843,14 +8846,14 @@ 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_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
@@ -8892,11 +8895,11 @@ 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
SET_SOUND_REVERB(FALSE);
@@ -8909,12 +8912,12 @@ 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_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 30;
SET_SOUND_REVERB(FALSE);
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
@@ -8933,12 +8936,12 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_nVolume = (m_anRandomTable[1] % 10 + 45.0f) * (75.0f - CObject::fDistToNearestTree) * (4.0f / 300.0f) * wind;
m_sQueueSample.m_nCounter = 5;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
- m_sQueueSample.m_nOffset = 63;
+ m_sQueueSample.m_nPriority = 1;
+ m_sQueueSample.m_nPan = 63;
m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
SET_SOUND_REVERB(FALSE);
SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
@@ -9129,29 +9132,29 @@ cAudioManager::ProcessFrontEnd()
// m_sQueueSample.m_nVolume = (CWeather::Wind - 1.0f) * m_sQueueSample.m_nVolume;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = TRUE;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU;
- 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 = 0;
+ m_sQueueSample.m_nPan = 0;
m_sQueueSample.m_fDistance = 1.0f;
} else {
sample = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
if (sample == SOUND_BULLETTRACE_1) {
- m_sQueueSample.m_nOffset = 20;
+ m_sQueueSample.m_nPan = 20;
m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_fDistance = 100.0f;
} else if (sample == SOUND_BULLETTRACE_2) {
- m_sQueueSample.m_nOffset = 107;
+ m_sQueueSample.m_nPan = 107;
m_sQueueSample.m_nVolume = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_fDistance = 100.0f;
} else {
- m_sQueueSample.m_nOffset = 63;
+ m_sQueueSample.m_nPan = 63;
m_sQueueSample.m_fDistance = 1.0f;
}
}
@@ -9161,13 +9164,13 @@ cAudioManager::ProcessFrontEnd()
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();
}
if (center) {
++m_sQueueSample.m_nSampleIndex;
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_nOffset = 63;
+ m_sQueueSample.m_nPan = 63;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
AddSampleToRequestedQueue();
}
@@ -9195,15 +9198,15 @@ 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_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -9213,7 +9216,7 @@ 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_bStatic = TRUE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
@@ -9235,45 +9238,45 @@ cAudioManager::ProcessProjectiles()
switch (CProjectileInfo::GetProjectileInfo(i)->m_eWeaponType) {
case WEAPONTYPE_TEARGAS:
emittingVol = 80;
- m_sQueueSample.m_SoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_PALM_TREE_LO;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 13879;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
break;
case WEAPONTYPE_MOLOTOV:
emittingVol = 50;
- m_sQueueSample.m_SoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
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;
case WEAPONTYPE_ROCKET:
emittingVol = 127;
- m_sQueueSample.m_SoundIntensity = 90.0f;
+ m_sQueueSample.m_MaxDistance = 90.0f;
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;
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();
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_bStatic = FALSE;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -9303,17 +9306,17 @@ cAudioManager::ProcessEscalators()
m_sQueueSample.m_nSampleIndex = SFX_BOAT_V12_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = i * 50 % 250 + 3973;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
SET_EMITTING_VOLUME(EMITTING_VOLUME);
SET_LOOP_OFFSETS(SFX_BOAT_V12_LOOP)
SET_SOUND_REVERB(TRUE);
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -9345,15 +9348,15 @@ cAudioManager::ProcessExtraSounds()
// m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARCADE);
// m_sQueueSample.m_bIs2D = FALSE;
// m_sQueueSample.m_nLoopCount = 0;
- // m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- // m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ // m_sQueueSample.m_bStatic = FALSE;
+ // m_sQueueSample.m_nPriority = 4;
// m_sQueueSample.m_fSpeedMultiplier = 3.0f;
// SET_EMITTING_VOLUME(EMITTING_VOLUME);
// SET_LOOP_OFFSETS(SFX_ARCADE)
// SET_SOUND_REVERB(TRUE);
- // m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
+ // m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
// SET_SOUND_REFLECTION(FALSE);
- // m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ // m_sQueueSample.m_nFramesToPlay = 3;
// AddSampleToRequestedQueue();
// }
// }
@@ -9401,7 +9404,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;
@@ -9412,8 +9415,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;
@@ -9421,17 +9424,17 @@ 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_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REVERB(TRUE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -9458,13 +9461,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_MaxDistance = SOUND_INTENSITY;
SET_SOUND_REVERB(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++;
@@ -9497,7 +9500,7 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nVolume = ComputeVolume(40, 35.0f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_nPriority = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nCounter = 0;
SET_EMITTING_VOLUME(40);
@@ -9505,10 +9508,10 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_SoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = FALSE;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
SET_SOUND_REFLECTION(FALSE);
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
AddSampleToRequestedQueue();
}
@@ -9559,15 +9562,15 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_EXTRAS;
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_MaxDistance = 450.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
SET_SOUND_REVERB(FALSE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
@@ -9585,15 +9588,15 @@ 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_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
SET_SOUND_REVERB(FALSE);
AddSampleToRequestedQueue();
}
@@ -9619,14 +9622,14 @@ 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_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
SET_SOUND_REVERB(FALSE);
SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();