summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-12 15:04:25 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-12 15:04:25 +0200
commit4141caa4d6e078fe1abbf87d8ab011c7c0705ffa (patch)
tree03b52846a966f00edf3a818da81eb0fb67c71372 /src/audio/AudioLogic.cpp
parentMerge remote-tracking branch 'aap/lcs' into lcs (diff)
parentFix sampman_null (diff)
downloadre3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar.gz
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar.bz2
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar.lz
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar.xz
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.tar.zst
re3-4141caa4d6e078fe1abbf87d8ab011c7c0705ffa.zip
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp214
1 files changed, 117 insertions, 97 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 8880110a..e2cd4e75 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -921,7 +921,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -972,7 +972,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
@@ -997,7 +997,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
@@ -1013,7 +1013,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
@@ -1057,7 +1057,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 140.0f;
@@ -1090,7 +1090,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -1125,7 +1125,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = propellerSpeed * 100.0f;
+ SET_EMITTING_VOLUME(propellerSpeed * 100.0f);
SET_LOOP_OFFSETS(SFX_SEAPLANE_PRO4)
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = 20.0f;
@@ -1156,7 +1156,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = volumeModifier * 25.0f;
+ SET_EMITTING_VOLUME(volumeModifier * 25.0f);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 27.0f;
@@ -1202,7 +1202,7 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1254,7 +1254,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6000.0f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
+ SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = reverseGearIntensity;
@@ -1311,7 +1311,7 @@ cAudioManager::ProcessModelHeliVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 70;
+ SET_EMITTING_VOLUME(70);
SET_LOOP_OFFSETS(SFX_CAR_RC_HELI)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1374,7 +1374,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
SET_LOOP_OFFSETS(SFX_RC_REV)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1438,7 +1438,7 @@ cAudioManager::ProcessModelVehicle(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1507,7 +1507,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BURST_L;
m_sQueueSample.m_nFrequency = (5500.0f * modifier) + 8000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(SFX_TYRE_BURST_L)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1572,7 +1572,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
}
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1631,7 +1631,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
m_sQueueSample.m_nFrequency = freq + freq * multiplier;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1855,7 +1855,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
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;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -1918,7 +1918,7 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, uint32 freq, uint32 samp
} else {
m_sQueueSample.m_nLoopCount = 1;
}
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
+ SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
@@ -1944,7 +1944,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nFrequency = 12500;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_nEmittingVolume = 80;
+ SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 200.0f;
@@ -1964,7 +1964,7 @@ cAudioManager::ProcessCesna(cVehicleParams &params)
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_nEmittingVolume = 80;
+ SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 90.0f;
@@ -2287,6 +2287,9 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
AddPlayerCarSample(vol, freq, aEngineSounds[engineSoundType - CAR_SFX_BANKS_OFFSET][1], SFX_BANK_0, 2, TRUE);
} else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
+#ifndef EXTERNAL_3D_SOUND
+ m_sQueueSample.m_nOffset = ComputePan(m_sQueueSample.m_fDistance, &pos);
+#endif
if (bAccelSampleStopped) {
if (CurrentPretendGear != 1 || currentGear != 2)
CurrentPretendGear = Max(1, currentGear - 1);
@@ -2294,10 +2297,15 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
bAccelSampleStopped = FALSE;
}
if (channelUsed) {
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120);
SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z);
- SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f);
- freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050) ;
+ SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 50.0f * 0.25f);
+#else
+ SampleManager.SetChannelVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, ComputeVolume(120, 50.0f, m_sQueueSample.m_fDistance));
+ SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nOffset);
+#endif
+ freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
SampleManager.SetChannelFrequency(CHANNEL_PLAYER_VEHICLE_ENGINE, freq);
@@ -2313,9 +2321,14 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
SampleManager.SetChannelLoopCount(CHANNEL_PLAYER_VEHICLE_ENGINE, 1);
SampleManager.SetChannelLoopPoints(CHANNEL_PLAYER_VEHICLE_ENGINE, 0, -1);
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120);
SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z);
- SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f);
+ SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 50.0f * 0.25f);
+#else
+ SampleManager.SetChannelVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, ComputeVolume(120, 50.0f, m_sQueueSample.m_fDistance));
+ SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nOffset);
+#endif
freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050);
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
@@ -2333,9 +2346,14 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
SampleManager.SetChannelLoopCount(CHANNEL_PLAYER_VEHICLE_ENGINE, 1);
SampleManager.SetChannelLoopPoints(CHANNEL_PLAYER_VEHICLE_ENGINE, 0, -1);
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 120);
SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z);
- SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 12.5f);
+ SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 50.0f * 0.25f);
+#else
+ SampleManager.SetChannelVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, ComputeVolume(120, 50.0f, m_sQueueSample.m_fDistance));
+ SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nOffset);
+#endif
freq = (GearFreqAdj[CurrentPretendGear] + freqModifier + 22050);
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
@@ -2481,7 +2499,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 8;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -2584,9 +2602,9 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
m_sQueueSample.m_nLoopCount = 0;
#ifdef FIX_BUGS
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
#else
- m_sQueueSample.m_nEmittingVolume = 80;
+ SET_EMITTING_VOLUME(80);
#endif
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
@@ -2668,7 +2686,7 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 7.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -2711,9 +2729,9 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
m_sQueueSample.m_nFrequency = (100 * m_sQueueSample.m_nEntityIndex & 1023) + SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING);
m_sQueueSample.m_nLoopCount = 0;
#ifdef FIX_BUGS
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
#else
- m_sQueueSample.m_nEmittingVolume = 60;
+ SET_EMITTING_VOLUME(60);
#endif
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
@@ -2759,7 +2777,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -2804,7 +2822,7 @@ cAudioManager::ProcessAirBrakes(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = volume;
+ SET_EMITTING_VOLUME(volume);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -2860,7 +2878,7 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
+ SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -2908,7 +2926,7 @@ cAudioManager::ProcessCarBombTick(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ SET_EMITTING_VOLUME(EMITTING_VOLUME);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -3502,7 +3520,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
}
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bReverbFlag = TRUE;
if (isHeli) {
if (0.2f * m_sQueueSample.m_fSoundIntensity > m_sQueueSample.m_fDistance) {
@@ -3575,7 +3593,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -3597,7 +3615,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
// m_sQueueSample.m_nReleasingVolumeModificator = 5;
// m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987;
// m_sQueueSample.m_nLoopCount = 0;
- // m_sQueueSample.m_nEmittingVolume = emittingVol;
+ // SET_EMITTING_VOLUME(emittingVol);
// SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
// m_sQueueSample.m_fSpeedMultiplier = 6.0f;
// m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -3719,7 +3737,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = Vol;
+ SET_EMITTING_VOLUME(Vol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
@@ -3743,7 +3761,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 80;
+ SET_EMITTING_VOLUME(80);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
@@ -3790,7 +3808,7 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = vol;
+ SET_EMITTING_VOLUME(vol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
@@ -3957,7 +3975,7 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -3988,7 +4006,7 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -4018,7 +4036,7 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -4047,7 +4065,7 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -4077,7 +4095,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -4233,7 +4251,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4260,7 +4278,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_fSoundIntensity = 30.0f;
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4359,7 +4377,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 26 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4414,7 +4432,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 20 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4438,7 +4456,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_IDLE)
- m_sQueueSample.m_nEmittingVolume = 100;
+ SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
@@ -4461,7 +4479,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK)
- m_sQueueSample.m_nEmittingVolume = 100;
+ SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
@@ -4486,7 +4504,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 0;
emittingVol = 100;
SET_LOOP_OFFSETS(SFX_CAR_CHAINSAW_ATTACK)
- m_sQueueSample.m_nEmittingVolume = 100;
+ SET_EMITTING_VOLUME(100);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
@@ -4511,7 +4529,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 80;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4531,7 +4549,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[1] % 10 + 90;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4551,7 +4569,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4572,7 +4590,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 10 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4592,7 +4610,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 10 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4611,7 +4629,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4631,7 +4649,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4649,7 +4667,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4668,7 +4686,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4686,7 +4704,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 90;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4705,7 +4723,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 90;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4728,7 +4746,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 110;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4746,7 +4764,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_nEmittingVolume = 90;
+ SET_EMITTING_VOLUME(90);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 6;
@@ -4767,7 +4785,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
- m_sQueueSample.m_nEmittingVolume = 127;
+ SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
stereo = TRUE;
@@ -4824,7 +4842,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
- m_sQueueSample.m_nEmittingVolume = 75;
+ SET_EMITTING_VOLUME(75);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4888,7 +4906,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 80;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4907,7 +4925,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 70;
- m_sQueueSample.m_nEmittingVolume = 70;
+ SET_EMITTING_VOLUME(70);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
@@ -4925,7 +4943,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 90;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
break;
@@ -4945,7 +4963,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 30 + 70;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -4981,7 +4999,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -5007,7 +5025,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = (m_anRandomTable[2] % 20 + 70) * param1 / 127;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -5025,7 +5043,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(150);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_LEFT)
- m_sQueueSample.m_nEmittingVolume = 127;
+ SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
@@ -5042,7 +5060,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(150);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(SFX_MINIGUN_FIRE_RIGHT)
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
@@ -5059,7 +5077,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
m_sQueueSample.m_nLoopCount = 1;
RESET_LOOP_OFFSETS
emittingVol = 127;
- m_sQueueSample.m_nEmittingVolume = 127;
+ SET_EMITTING_VOLUME(127);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
m_sQueueSample.m_bRequireReflection = TRUE;
@@ -5101,7 +5119,7 @@ cAudioManager::ProcessPedOneShots(cPedParams &params)
maxDist = SQR(15);
m_sQueueSample.m_nLoopCount = 0;
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
@@ -8116,7 +8134,9 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_nLoopStart = 0;
AudioManager.m_sQueueSample.m_nLoopEnd = -1;
#endif
+#ifdef EXTERNAL_3D_SOUND
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
+#endif
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
AudioManager.m_sQueueSample.m_fSoundIntensity = 40.0f;
AudioManager.m_sQueueSample.m_bReleasingSoundFlag = TRUE;
@@ -8237,7 +8257,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
RESET_LOOP_OFFSETS
m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
@@ -8303,7 +8323,7 @@ cAudioManager::ProcessFires(int32)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_bRequireReflection = FALSE;
@@ -8326,7 +8346,7 @@ cAudioManager::ProcessFires(int32)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_bRequireReflection = FALSE;
@@ -8361,7 +8381,7 @@ cAudioManager::ProcessWaterCannon(int32)
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
- m_sQueueSample.m_nEmittingVolume = 50;
+ SET_EMITTING_VOLUME(50);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_bRequireReflection = FALSE;
@@ -8643,7 +8663,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
+ SET_EMITTING_VOLUME(emittingVolume);
RESET_LOOP_OFFSETS
m_sQueueSample.m_bReverbFlag = TRUE;
AddSampleToRequestedQueue();
@@ -8860,7 +8880,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_bReverbFlag = TRUE;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
+ SET_EMITTING_VOLUME(emittingVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
@@ -8903,7 +8923,7 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bReleasingSoundFlag = TRUE;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
RESET_LOOP_OFFSETS
m_sQueueSample.m_bReverbFlag = FALSE;
m_sQueueSample.m_bRequireReflection = FALSE;
@@ -8922,7 +8942,7 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 30;
m_sQueueSample.m_bReverbFlag = FALSE;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
@@ -8946,7 +8966,7 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_nReleasingVolumeDivider = 7;
m_sQueueSample.m_bReverbFlag = FALSE;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bRequireReflection = FALSE;
AddSampleToRequestedQueue();
@@ -9139,7 +9159,7 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nBankIndex = SFX_BANK_FRONT_END_MENU;
m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bIs2D = TRUE;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
RESET_LOOP_OFFSETS
if (stereo) {
m_sQueueSample.m_nOffset = 0;
@@ -9204,7 +9224,7 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = 6000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 100;
+ SET_EMITTING_VOLUME(100);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
@@ -9277,7 +9297,7 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
+ SET_EMITTING_VOLUME(emittingVol);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
m_sQueueSample.m_bReverbFlag = TRUE;
@@ -9316,7 +9336,7 @@ cAudioManager::ProcessEscalators()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ SET_EMITTING_VOLUME(EMITTING_VOLUME);
SET_LOOP_OFFSETS(SFX_BOAT_V12_LOOP)
m_sQueueSample.m_bReverbFlag = TRUE;
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
@@ -9354,7 +9374,7 @@ cAudioManager::ProcessExtraSounds()
// m_sQueueSample.m_bReleasingSoundFlag = FALSE;
// m_sQueueSample.m_nReleasingVolumeModificator = 4;
// m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- // m_sQueueSample.m_nEmittingVolume = EMITTING_VOLUME;
+ // SET_EMITTING_VOLUME(EMITTING_VOLUME);
// SET_LOOP_OFFSETS(SFX_ARCADE)
// m_sQueueSample.m_bReverbFlag = TRUE;
// m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -9434,7 +9454,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nEmittingVolume = 90;
+ SET_EMITTING_VOLUME(90);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
@@ -9465,7 +9485,7 @@ cAudioManager::ProcessGarages()
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nReleasingVolumeModificator = 4;
- m_sQueueSample.m_nEmittingVolume = 60;
+ SET_EMITTING_VOLUME(60);
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_bReverbFlag = TRUE;
@@ -9506,7 +9526,7 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_nEmittingVolume = 40;
+ SET_EMITTING_VOLUME(40);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
@@ -9568,7 +9588,7 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 100;
+ SET_EMITTING_VOLUME(100);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 450.0f;
@@ -9594,7 +9614,7 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
@@ -9628,7 +9648,7 @@ cAudioManager::ProcessBridgeOneShots()
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;