summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index e4340bdc..3ec40437 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -989,8 +989,8 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
freq = 25000;
}
if (isPlayerVeh) {
- volume = clamp2(volume, prevVolume, 7);
- freq = clamp2(freq, prevFreq, 800);
+ volume = Clamp2(volume, prevVolume, 7);
+ freq = Clamp2(freq, prevFreq, 800);
}
if (volume > 0) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -1038,8 +1038,8 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
freq = Min(22000, (8000 * acceletateState / 255 + 14000) * 3.0f * Abs(params.m_fVelocityChange));
}
if (isPlayerVeh && !vehSlowdown) {
- volume = clamp2(volume, prevVolume, 7);
- freq = clamp2(freq, prevFreq, 800);
+ volume = Clamp2(volume, prevVolume, 7);
+ freq = Clamp2(freq, prevFreq, 800);
}
if (!vehSlowdown)
#ifdef THIS_IS_STUPID
@@ -1118,7 +1118,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
}
if (acceletateState < brakeState)
acceletateState = brakeState;
- freq = clamp2(5 * acceletateState + 22050, prevFreq, 30);
+ freq = Clamp2(5 * acceletateState + 22050, prevFreq, 30);
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(70, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) {
@@ -1658,8 +1658,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
bHandbrakeOnLastFrame = FALSE;
}
if (CReplay::IsPlayingBack()) {
- accelerateState = (255.0f * clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
- brakeState = (255.0f * clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f));
+ accelerateState = (255.0f * Clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
+ brakeState = (255.0f * Clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f));
} else {
accelerateState = Pads[0].GetAccelerate();
brakeState = Pads[0].GetBrake();
@@ -1810,7 +1810,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
}
}
relativeVelocityChange = 2.0f * params.m_fVelocityChange / params.m_pTransmission->fMaxVelocity;
- accelerationMultipler = clamp(relativeVelocityChange, 0.0f, 1.0f);
+ accelerationMultipler = Clamp(relativeVelocityChange, 0.0f, 1.0f);
gasPedalAudio = accelerationMultipler;
switch (engineSoundType) {
case SFX_BANK_MOPED:
@@ -3585,7 +3585,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713;
if (propellerSpeed < 1.0f)
m_sQueueSample.m_nFrequency = (propellerSpeed + 1.0f) * (m_sQueueSample.m_nFrequency / 2.0f);
- m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197);
+ m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqFrontPrev, 197);
freqFrontPrev = m_sQueueSample.m_nFrequency;
m_sQueueSample.m_bIs2D = FALSE;
@@ -3641,7 +3641,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
if (propellerSpeed < 1.0f)
m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2);
- m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqPropellerPrev, 98);
+ m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqPropellerPrev, 98);
freqPropellerPrev = m_sQueueSample.m_nFrequency;
} else {
m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_MAI2;
@@ -3710,7 +3710,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 14287 + Min(1.0f, freqModifier) * 3713;
if (propellerSpeed < 1.0f)
m_sQueueSample.m_nFrequency = (propellerSpeed + 1) * (m_sQueueSample.m_nFrequency / 2.0f);
- m_sQueueSample.m_nFrequency = clamp2(m_sQueueSample.m_nFrequency, freqSkimmerPrev, 197);
+ m_sQueueSample.m_nFrequency = Clamp2(m_sQueueSample.m_nFrequency, freqSkimmerPrev, 197);
freqSkimmerPrev = m_sQueueSample.m_nFrequency;
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO4;