More audio

This commit is contained in:
Filip Gawin 2020-12-22 14:53:45 +01:00
parent 867133e93d
commit 35473e653d
4 changed files with 303 additions and 230 deletions

View File

@ -71,31 +71,33 @@ cAudioManager::GetCollisionOneShotRatio(int32 a, float b) const
case SURFACE_TARMAC: case SURFACE_TARMAC:
case SURFACE_PAVEMENT: case SURFACE_PAVEMENT:
case SURFACE_STEEP_CLIFF: case SURFACE_STEEP_CLIFF:
case SURFACE_TRANSPARENT_STONE: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break; case SURFACE_TRANSPARENT_STONE:
case SURFACE_CONCRETE_BEACH: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
case SURFACE_GRASS: case SURFACE_GRASS:
case SURFACE_GRAVEL:
case SURFACE_MUD_DRY:
case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break; case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
case SURFACE_GRAVEL: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
case SURFACE_MUD_DRY: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break; case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
case SURFACE_GLASS: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break; case SURFACE_GLASS:
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
case SURFACE_TRANSPARENT_CLOTH: case SURFACE_TRANSPARENT_CLOTH:
case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break; case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break; case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break; case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
case SURFACE_SCAFFOLD_POLE: case SURFACE_SCAFFOLD_POLE:
case SURFACE_METAL_GATE: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break; case SURFACE_METAL_GATE:
case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break; case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break; case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break; case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break; case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
case SURFACE_SAND: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break; case SURFACE_SAND:
case SURFACE_WATER: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break; case SURFACE_WATER:
case SURFACE_RUBBER:
case SURFACE_WHEELBASE:
case SURFACE_SAND_BEACH: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break; case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break; case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break; case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
case SURFACE_RUBBER:
case SURFACE_WHEELBASE: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break; case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break; case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break; case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
@ -135,8 +137,8 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP; m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000; m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
vol = 30.f * ratio; vol = 30.f * ratio;
} else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY || } else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY || surface2 == SURFACE_MUD_DRY ||
surface2 == SURFACE_MUD_DRY || surface1 == SURFACE_SAND || surface2 == SURFACE_SAND) { surface1 == SURFACE_SAND || surface2 == SURFACE_SAND || surface1 == SURFACE_SAND_BEACH || surface2 == SURFACE_SAND_BEACH) {
ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f); ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID; m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000; m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
@ -156,12 +158,12 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
void void
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter) cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
{ {
bool distCalculated = false;
if(col.m_fIntensity2 > 0.0016f) { if(col.m_fIntensity2 > 0.0016f) {
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col); uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
if(emittingVol) { if(emittingVol) {
m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance); CalculateDistance(distCalculated, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_nVolume) { if(m_sQueueSample.m_nVolume) {
m_sQueueSample.m_nCounter = counter; m_sQueueSample.m_nCounter = counter;
m_sQueueSample.m_vecPos = col.m_vecPosition; m_sQueueSample.m_vecPos = col.m_vecPosition;
@ -266,7 +268,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4; m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4;
break; break;
case SFX_COL_PED_1: case SFX_COL_PED_1:
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 5; m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 2;
break; break;
case SFX_COL_WOOD_CRATES_1: case SFX_COL_WOOD_CRATES_1:
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4; m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4;

View File

@ -317,7 +317,6 @@ cAudioManager::ProcessPlayerMood()
return; return;
} }
//lastMissionPassedTime = CTheScripts::GetLastMissionPassedTime();
if (lastMissionPassedTime != -1) { if (lastMissionPassedTime != -1) {
if (curTime < lastMissionPassedTime) { if (curTime < lastMissionPassedTime) {
lastMissionPassedTime = curTime; lastMissionPassedTime = curTime;
@ -1568,29 +1567,12 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
} }
void void
cAudioManager::ProcessCesna(cVehicleParams& params) cAudioManager::ProcessCesna(cVehicleParams &params)
{ {
static uint8 nAccel = 0; if(params.m_fDistance < SQR(200)) {
//((CAutomobile *)params.m_pVehicle)->Damage.GetEngineStatus();
if (FindPlayerVehicle() == params.m_pVehicle) {
if (params.m_nIndex == DODO) {
if (Pads[0].GetAccelerate() <= 0) {
if (nAccel != 0)
--nAccel;
} else if (nAccel < 60) {
++nAccel;
}
AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SFX_BANK_0, 2, true);
}
} else if (params.m_nIndex == DODO) {
AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
} else if (params.m_fDistance < SQR(200)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) { if(m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 52; m_sQueueSample.m_nCounter = 52;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE; m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nBankIndex = SFX_BANK_0;
@ -1602,28 +1584,28 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
m_sQueueSample.m_nEmittingVolume = 80; m_sQueueSample.m_nEmittingVolume = 80;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 8.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 200.0f; m_sQueueSample.m_fSoundIntensity = 200.0f;
m_sQueueSample.m_bReleasingSoundFlag = false; m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} }
if (params.m_fDistance < SQR(90)) { if(params.m_fDistance < SQR(90)) {
m_sQueueSample.m_nVolume = ComputeVolume(80, 90.f, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(80, 90.f, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) { if(m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV; m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 0; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = 25000; m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nReleasingVolumeDivider = 4; m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_nEmittingVolume = 80; m_sQueueSample.m_nEmittingVolume = 80;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 8.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 90.0f; m_sQueueSample.m_fSoundIntensity = 90.0f;
m_sQueueSample.m_bReleasingSoundFlag = false; m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
@ -3271,7 +3253,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
static uint16 LastAccel = 0; static uint16 LastAccel = 0;
static uint8 LastVol = 0; static uint8 LastVol = 0;
static const int intensity = 50; static const int intensity = 90;
if (params.m_fDistance < SQR(intensity)) { if (params.m_fDistance < SQR(intensity)) {
boat = (CBoat *)params.m_pVehicle; boat = (CBoat *)params.m_pVehicle;
@ -3432,7 +3414,7 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f; m_sQueueSample.m_fSoundIntensity = 50.0f;
m_sQueueSample.m_bReleasingSoundFlag = false; m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 6;
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
@ -3880,8 +3862,8 @@ cAudioManager::ProcessJumbo(cVehicleParams& params)
CPlane *plane; CPlane *plane;
float position; float position;
//if (params.m_fDistance >= SQR(440)) if (params.m_fDistance >= SQR(440))
// return; return;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance); CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
plane = (CPlane*)params.m_pVehicle; plane = (CPlane*)params.m_pVehicle;
@ -4083,27 +4065,26 @@ bool
cAudioManager::SetupJumboFlySound(uint8 emittingVol) cAudioManager::SetupJumboFlySound(uint8 emittingVol)
{ {
const float SOUND_INTENSITY = 440.0f; const float SOUND_INTENSITY = 440.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) if(m_sQueueSample.m_fDistance >= SOUND_INTENSITY) return false;
return false;
int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance); int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = vol; m_sQueueSample.m_nVolume = vol;
if (m_sQueueSample.m_nVolume != 0) { if(m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_bReleasingSoundFlag = false;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} }
return true; return true;
@ -4149,7 +4130,7 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
int32 int32
cAudioManager::GetJumboTaxiFreq() const cAudioManager::GetJumboTaxiFreq() const
{ {
return (60.833f * m_sQueueSample.m_fDistance) + 22050; return (1.f / 180 * 10950 * m_sQueueSample.m_fDistance) + 22050; // todo port fix to re3
} }
#pragma endregion Some jumbo crap #pragma endregion Some jumbo crap
@ -5449,7 +5430,7 @@ cAudioManager::GetPlayerTalkSfx(CPed *ped, int16 sound)
{ {
uint32 sfx; uint32 sfx;
if(this->m_bIsPlayerShutUp) return NO_SAMPLE; if(m_bIsPlayerShutUp) return NO_SAMPLE;
switch(sound) { switch(sound) {
case SOUND_PED_DEATH: return 9796; case SOUND_PED_DEATH: return 9796;
case SOUND_PED_DAMAGE: case SOUND_PED_DAMAGE:
@ -8466,116 +8447,204 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
uint8 emittingVolume; uint8 emittingVolume;
float distSquared; float distSquared;
switch (sound) { switch(sound) {
/*case SCRIPT_SOUND_PARTY_1_LOOP_S: case SCRIPT_SOUND_BANK_ALARM_LOOP:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_BUILDINGS_BANK_ALARM;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_1; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = MAX_VOLUME; emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BUILDINGS_BANK_ALARM);
m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP:
case SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP:
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP;
m_sQueueSample.m_nBankIndex = 0;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GARAGE_DOOR_LOOP);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_1_LOOP_L: case SCRIPT_SOUND_SNORING_LOOP:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_fSoundIntensity = 6.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_SNORE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_1; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = MAX_VOLUME; emittingVolume = 25;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BUILDING_SNORE);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 6;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 3.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_2_LOOP_S: case SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_fSoundIntensity = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2; m_sQueueSample.m_nSampleIndex = SFX_TANK_TURRET;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_2; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = MAX_VOLUME; emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TANK_TURRET);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 2.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_2_LOOP_L: case SCRIPT_SOUND_NEW_BUILDING_BAR_1:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_1;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2; m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_2; m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = MAX_VOLUME; emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_3_LOOP_S: case SCRIPT_SOUND_NEW_BUILDING_BAR_2:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_2;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3; m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_3; m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = MAX_VOLUME; emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_3_LOOP_L: case SCRIPT_SOUND_NEW_BUILDING_BAR_3:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_3;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3; m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_3; m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = MAX_VOLUME; emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_4_LOOP_S: case SCRIPT_SOUND_NEW_BUILDING_BAR_4:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_BAR_4;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4; m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_4; m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = MAX_VOLUME; emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4); m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_4_LOOP_L: case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; if(MusicManager.m_nPlayingTrack == 18) return;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_4; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = MAX_VOLUME; MusicManager.SetMalibuClubTrackPos(40);
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4); m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PARTY_1_LOOP: case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L; if(MusicManager.m_nPlayingTrack == 18) return;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_1; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = MAX_VOLUME; MusicManager.SetMalibuClubTrackPos(41);
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1); m_sQueueSample.m_fSoundIntensity = 80.0;
emittingVolume = 127;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nReleasingVolumeModificator = 3; m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nReleasingVolumeDivider = 3; m_sQueueSample.m_nReleasingVolumeDivider = 15;
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break; break;
case SCRIPT_SOUND_PRETEND_FIRE_LOOP: case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3:
m_sQueueSample.m_fSoundIntensity = 50.0f; if(MusicManager.m_nPlayingTrack == 18) return;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE; m_sQueueSample.m_nSampleIndex = SFX_BUILDING_MAL3;
m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_nBankIndex = 0;
emittingVolume = 80; MusicManager.SetMalibuClubTrackPos(42);
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE); m_sQueueSample.m_fSoundIntensity = 80.0;
m_sQueueSample.m_nReleasingVolumeModificator = 8; emittingVolume = 127;
m_sQueueSample.m_nReleasingVolumeDivider = 10; m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 2.0f; m_sQueueSample.m_nReleasingVolumeModificator = 3;
break;*/ m_sQueueSample.m_nReleasingVolumeDivider = 15;
default: m_sQueueSample.m_fSpeedMultiplier = 4.0;
return; m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_1:
if(MusicManager.m_nPlayingTrack == 17) return;
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR1;
m_sQueueSample.m_nBankIndex = 0;
MusicManager.SetStripClubTrackPos(43);
m_sQueueSample.m_fSoundIntensity = 80.0;
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_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_2:
if(MusicManager.m_nPlayingTrack == 17) return;
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR2;
m_sQueueSample.m_nBankIndex = 0;
MusicManager.SetStripClubTrackPos(44);
m_sQueueSample.m_fSoundIntensity = 80.0;
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_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_NEW_BUILDING_STRIP_3:
if(MusicManager.m_nPlayingTrack == 17) return;
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_STR3;
m_sQueueSample.m_nBankIndex = 0;
MusicManager.SetStripClubTrackPos(45);
m_sQueueSample.m_fSoundIntensity = 80.0;
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_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_NEW_BUILDING_CHURCH:
m_sQueueSample.m_nSampleIndex = SFX_BUILDING_CHURCH;
m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_fSoundIntensity = 80.0;
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_fSpeedMultiplier = 4.0;
m_sQueueSample.m_bIs2D = 0;
break;
case SCRIPT_SOUND_NEW_WATERFALL:
emittingVolume = 30;
m_sQueueSample.m_fSoundIntensity = 80.0;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nBankIndex = 0;
m_sQueueSample.m_nFrequency = 20812;
m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nReleasingVolumeDivider = 9;
m_sQueueSample.m_fSpeedMultiplier = 2.0;
m_sQueueSample.m_bIs2D = 0;
break;
default: return;
} }
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos); distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) { if(distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared); m_sQueueSample.m_fDistance = distSquared <= 0.0f ? 0.0f : Sqrt(distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) { if(m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 0; m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_bIs2D = false; m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nLoopCount = 0;
@ -9941,7 +10010,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
} }
break; break;
case LOADING_STATUS_FAILED: case LOADING_STATUS_FAILED:
if (++nFramesUntilFailedLoad[slot] >= 90) { if (++nFramesUntilFailedLoad[slot] >= 120) {
nFramesForPretendPlaying[slot] = 0; nFramesForPretendPlaying[slot] = 0;
g_bMissionAudioLoadFailed[slot] = true; g_bMissionAudioLoadFailed[slot] = true;
nFramesUntilFailedLoad[slot] = 0; nFramesUntilFailedLoad[slot] = 0;

View File

@ -20,7 +20,7 @@ const int allChannels = channels + 2;
cAudioManager::cAudioManager() cAudioManager::cAudioManager()
{ {
m_bIsInitialised = false; m_bIsInitialised = false;
field_1 = 1; m_bReverb = true;
m_fSpeedOfSound = 6.86f; m_fSpeedOfSound = 6.86f;
m_nTimeSpent = 50; m_nTimeSpent = 50;
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS; m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
@ -426,7 +426,8 @@ cAudioManager::CheckForAnAudioFileOnCD() const
uint8 uint8
cAudioManager::GetCDAudioDriveLetter() const cAudioManager::GetCDAudioDriveLetter() const
{ {
return SampleManager.GetCDAudioDriveLetter(); if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
return 0;
} }
bool bool
@ -456,7 +457,7 @@ cAudioManager::ServiceSoundEffects()
ClearActiveSamples(); ClearActiveSamples();
} }
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1; m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
ProcessReverb(); if(m_bReverb) ProcessReverb();
ProcessSpecial(); ProcessSpecial();
ClearRequestedQueue(); ClearRequestedQueue();
InterrogateAudioEntities(); InterrogateAudioEntities();

View File

@ -176,7 +176,7 @@ class cAudioManager
{ {
public: public:
bool m_bIsInitialised; bool m_bIsInitialised;
uint8 field_1; // unused uint8 m_bReverb; // unused
bool m_bFifthFrameFlag; bool m_bFifthFrameFlag;
uint8 m_nActiveSamples; uint8 m_nActiveSamples;
uint8 field_4; // unused uint8 field_4; // unused
@ -256,8 +256,8 @@ public:
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; // done uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; // done
int32 CreateEntity(eAudioType type, void *entity); // done int32 CreateEntity(eAudioType type, void *entity); // done
void DestroyAllGameCreatedEntities(); // done ? I don't seed pEntity = nil; void DestroyAllGameCreatedEntities(); // done
void DestroyEntity(int32 id); // done (inlined in vc) ? I not seen id checks void DestroyEntity(int32 id); // done (inlined in vc)
void DoPoliceRadioCrackle(); // done void DoPoliceRadioCrackle(); // done
// functions returning talk sfx, // functions returning talk sfx,
@ -359,38 +359,39 @@ public:
uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc) uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
// end of functions returning talk sfx // end of functions returning talk sfx
void GenerateIntegerRandomNumberTable(); // done void GenerateIntegerRandomNumberTable(); // done
char *Get3DProviderName(uint8 id) const; char *Get3DProviderName(uint8 id) const; // done
uint8 GetCDAudioDriveLetter() const; uint8 GetCDAudioDriveLetter() const; // done
int8 GetCurrent3DProviderIndex() const; int8 GetCurrent3DProviderIndex() const; // done
int8 AutoDetect3DProviders() const; // done int8 AutoDetect3DProviders() const; // done
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
float GetCollisionOneShotRatio(int32 a, float b) const; float GetCollisionOneShotRatio(int32 a, float b) const; // done
float GetCollisionRatio(float a, float b, float c, float d) const; float GetCollisionRatio(float a, float b, float c, float d) const; // done (inlined in vc)
float GetDistanceSquared(const CVector &v) const; // done (inlined in vc) float GetDistanceSquared(const CVector &v) const; // done (inlined in vc)
int32 GetJumboTaxiFreq() const; int32 GetJumboTaxiFreq() const; // done (inlined in vc)
uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done
int8 GetMissionScriptPoliceAudioPlayingStatus() const; int8 GetMissionScriptPoliceAudioPlayingStatus() const; // done
uint8 GetNum3DProvidersAvailable() const; // done uint8 GetNum3DProvidersAvailable() const; // done
uint32 GetPedCommentSfx(CPed *ped, int32 sound); uint32 GetPedCommentSfx(CPed *ped, int32 sound); // done
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; // done
float GetVehicleDriveWheelSkidValue(CVehicle* veh, tWheelState wheelState, float gasPedalAudio, cTransmission* transmission, float velocityChange); // done float GetVehicleDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, float gasPedalAudio, cTransmission *transmission,
float GetVehicleNonDriveWheelSkidValue(CVehicle* veh, tWheelState wheelState, cTransmission* transmission, float velocityChange); // done float velocityChange); // done
float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done
bool HasAirBrakes(int32 model) const; // done bool HasAirBrakes(int32 model) const; // done
void Initialise(); // done void Initialise(); // done
void InitialisePoliceRadio(); //done void InitialisePoliceRadio(); // done
void InitialisePoliceRadioZones(); //done void InitialisePoliceRadioZones(); // done
void InterrogateAudioEntities(); // done void InterrogateAudioEntities(); // done (inlined)
bool IsAudioInitialised() const; // done bool IsAudioInitialised() const; // done
bool IsMissionAudioSampleFinished(uint8 slot); // done bool IsMissionAudioSampleFinished(uint8 slot); // done
bool IsMP3RadioChannelAvailable() const; // done bool IsMP3RadioChannelAvailable() const; // done
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
void PlayLoadedMissionAudio(uint8 slot); // done void PlayLoadedMissionAudio(uint8 slot); // done
void PlayOneShot(int32 index, uint16 sound, float vol); // done void PlayOneShot(int32 index, uint16 sound, float vol); // done
void PlaySuspectLastSeen(float x, float y, float z); // done void PlaySuspectLastSeen(float x, float y, float z); // done
void PlayerJustGotInCar() const; // done void PlayerJustGotInCar() const; // done
void PlayerJustLeftCar() const; // done void PlayerJustLeftCar() const; // done
@ -403,7 +404,7 @@ public:
void ProcessActiveQueues(); // done void ProcessActiveQueues(); // done
bool ProcessAirBrakes(cVehicleParams& params); // done bool ProcessAirBrakes(cVehicleParams& params); // done
bool ProcessBoatEngine(cVehicleParams& params); bool ProcessBoatEngine(cVehicleParams& params);
bool ProcessBoatMovingOverWater(cVehicleParams& params); bool ProcessBoatMovingOverWater(cVehicleParams& params); //done
#ifdef GTA_BRIDGE #ifdef GTA_BRIDGE
void ProcessBridge(); // done(bcs not exists in VC) void ProcessBridge(); // done(bcs not exists in VC)
void ProcessBridgeMotor(); // done(bcs not exists in VC) void ProcessBridgeMotor(); // done(bcs not exists in VC)
@ -412,7 +413,7 @@ public:
#endif #endif
bool ProcessCarBombTick(cVehicleParams& params); // done bool ProcessCarBombTick(cVehicleParams& params); // done
void ProcessCarHeli(cVehicleParams& params); // done void ProcessCarHeli(cVehicleParams& params); // done
void ProcessCesna(cVehicleParams& params); // void ProcessCesna(cVehicleParams& params); // done
//void ProcessCrane(); // done(bcs not exists in VC) //void ProcessCrane(); // done(bcs not exists in VC)
bool ProcessEngineDamage(cVehicleParams& params); // done bool ProcessEngineDamage(cVehicleParams& params); // done
void ProcessEntity(int32 sound); // done void ProcessEntity(int32 sound); // done
@ -420,7 +421,7 @@ public:
void ProcessFireHydrant(); // done void ProcessFireHydrant(); // done
void ProcessFires(int32 entity); // done void ProcessFires(int32 entity); // done
void ProcessFrontEnd(); // done void ProcessFrontEnd(); // done
void ProcessGarages(); // void ProcessGarages(); // done
void ProcessJumbo(cVehicleParams& params); // done void ProcessJumbo(cVehicleParams& params); // done
void ProcessJumboAccel(CPlane *plane); // done void ProcessJumboAccel(CPlane *plane); // done
void ProcessJumboDecel(CPlane *plane); // done void ProcessJumboDecel(CPlane *plane); // done
@ -428,9 +429,9 @@ public:
void ProcessJumboLanding(CPlane *plane); // done void ProcessJumboLanding(CPlane *plane); // done
void ProcessJumboTakeOff(CPlane *plane); // done void ProcessJumboTakeOff(CPlane *plane); // done
void ProcessJumboTaxi(); // done void ProcessJumboTaxi(); // done
void ProcessLoopingScriptObject(uint8 sound); // void ProcessLoopingScriptObject(uint8 sound); // done
void ProcessMissionAudio(); // void ProcessMissionAudio(); // done
void ProcessMissionAudioSlot(uint8 slot); // void ProcessMissionAudioSlot(uint8 slot); // done
void ProcessModelHeliVehicle(cVehicleParams& params); // done void ProcessModelHeliVehicle(cVehicleParams& params); // done
void ProcessModelVehicle(cVehicleParams& params); // done void ProcessModelVehicle(cVehicleParams& params); // done
void ProcessOneShotScriptObject(uint8 sound); // void ProcessOneShotScriptObject(uint8 sound); //
@ -450,15 +451,15 @@ public:
bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC) bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC)
#endif #endif
void ProcessVehicle(CVehicle *vehicle); // done void ProcessVehicle(CVehicle *vehicle); // done
bool ProcessVehicleDoors(cVehicleParams& params); // done bool ProcessVehicleDoors(cVehicleParams &params); // done
void ProcessVehicleEngine(cVehicleParams& params); // done void ProcessVehicleEngine(cVehicleParams &params); // done
void ProcessVehicleFlatTyre(cVehicleParams& params); // done void ProcessVehicleFlatTyre(cVehicleParams &params); // done
bool ProcessVehicleHorn(cVehicleParams& params); // done bool ProcessVehicleHorn(cVehicleParams &params); // done
void ProcessVehicleOneShots(cVehicleParams& params); // done void ProcessVehicleOneShots(cVehicleParams &params); // done
bool ProcessVehicleReverseWarning(cVehicleParams& params); // done bool ProcessVehicleReverseWarning(cVehicleParams &params); // done
bool ProcessVehicleRoadNoise(cVehicleParams& params); // done bool ProcessVehicleRoadNoise(cVehicleParams &params); // done
bool ProcessVehicleSirenOrAlarm(cVehicleParams& params); // done bool ProcessVehicleSirenOrAlarm(cVehicleParams &params); // done
bool ProcessVehicleSkidding(cVehicleParams& params); // done bool ProcessVehicleSkidding(cVehicleParams &params); // done
void ProcessWaterCannon(int32); // done void ProcessWaterCannon(int32); // done
void ProcessWeather(int32 id); // done void ProcessWeather(int32 id); // done
bool ProcessWetRoadNoise(cVehicleParams& params); // done bool ProcessWetRoadNoise(cVehicleParams& params); // done
@ -474,52 +475,52 @@ public:
void ResetPoliceRadio(); // done void ResetPoliceRadio(); // done
void ResetTimers(uint32 time); // done void ResetTimers(uint32 time); // done
void Service(); //done void Service(); // done
void ServiceCollisions(); //done void ServiceCollisions(); // done
void ServicePoliceRadio(); void ServicePoliceRadio(); // done
void ServicePoliceRadioChannel(uint8 wantedLevel); void ServicePoliceRadioChannel(uint8 wantedLevel); // done
void ServiceSoundEffects(); void ServiceSoundEffects(); // done
int8 SetCurrent3DProvider(uint8 which); int8 SetCurrent3DProvider(uint8 which); // done
void SetDynamicAcousticModelingStatus(uint8 status); void SetDynamicAcousticModelingStatus(uint8 status); // done
void SetEffectsFadeVol(uint8 volume) const; void SetEffectsFadeVol(uint8 volume) const; // done
void SetEffectsMasterVolume(uint8 volume) const; void SetEffectsMasterVolume(uint8 volume) const; // done
void SetMP3BoostVolume(uint8 volume) const; void SetMP3BoostVolume(uint8 volume) const; // done
void SetEntityStatus(int32 id, uint8 status); //done void SetEntityStatus(int32 id, uint8 status); // done
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done
void SetMissionAudioLocation(uint8 slot, float x, float y, float z); void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done
void SetMissionScriptPoliceAudio(int32 sfx) const; void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized
void SetMonoMode(uint8 mono); void SetMonoMode(uint8 mono); // done
void SetMusicFadeVol(uint8 volume) const; void SetMusicFadeVol(uint8 volume) const; // done
void SetMusicMasterVolume(uint8 volume) const; void SetMusicMasterVolume(uint8 volume) const; // done
void SetSpeakerConfig(int32 conf) const; void SetSpeakerConfig(int32 conf) const; // done
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done
void SetUpOneShotCollisionSound(const cAudioCollision &col); void SetUpOneShotCollisionSound(const cAudioCollision &col); // done
bool SetupCrimeReport(); bool SetupCrimeReport(); // done
bool SetupJumboEngineSound(uint8 vol, uint32 freq); bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done
bool SetupJumboFlySound(uint8 emittingVol); bool SetupJumboFlySound(uint8 emittingVol); // done
bool SetupJumboRumbleSound(uint8 emittingVol); bool SetupJumboRumbleSound(uint8 emittingVol); // done
bool SetupJumboTaxiSound(uint8 vol); bool SetupJumboTaxiSound(uint8 vol); // done
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
void SetupPedComments(cPedParams &params, uint16 sound); // done void SetupPedComments(cPedParams &params, uint16 sound); // done
void SetupSuspectLastSeenReport(); void SetupSuspectLastSeenReport();
void Terminate(); //done void Terminate(); // done
void TranslateEntity(Const CVector *v1, CVector *v2) const; //done void TranslateEntity(Const CVector *v1, CVector *v2) const; // done
void UpdateGasPedalAudio(CVehicle* veh, int vehType); // done void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done
void UpdateReflections(); //done void UpdateReflections(); // done
bool UsesReverseWarning(int32 model) const; //done bool UsesReverseWarning(int32 model) const; // done
bool UsesSiren(cVehicleParams& params) const; //done bool UsesSiren(cVehicleParams &params) const; // done
bool UsesSirenSwitching(cVehicleParams& params) const; //done bool UsesSirenSwitching(cVehicleParams &params) const; // done
CVehicle *FindVehicleOfPlayer(); //done CVehicle *FindVehicleOfPlayer(); // done
void SetPedTalkingStatus(CPed *ped, uint8 status); void SetPedTalkingStatus(CPed *ped, uint8 status); // done
void SetPlayersMood(uint8 mood, uint32 time); void SetPlayersMood(uint8 mood, uint32 time); // done
#ifdef GTA_PC #ifdef GTA_PC
// only used in pc // only used in pc
void AdjustSamplesVolume(); void AdjustSamplesVolume(); // done (inlined)
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); // done (inlined)
#endif #endif
}; };