|
|
@ -590,7 +590,7 @@ cAudioManager::ClearActiveSamples()
|
|
|
|
m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_asActiveSamples[i].m_fSoundIntensity = 200.0f;
|
|
|
|
m_asActiveSamples[i].m_fSoundIntensity = 200.0f;
|
|
|
|
m_asActiveSamples[i].m_bOffset = 63;
|
|
|
|
m_asActiveSamples[i].m_bOffset = 63;
|
|
|
|
m_asActiveSamples[i].m_bReleasingSoundFlag = 0;
|
|
|
|
m_asActiveSamples[i].m_bReleasingSoundFlag = false;
|
|
|
|
m_asActiveSamples[i].m_nCalculatedVolume = 0;
|
|
|
|
m_asActiveSamples[i].m_nCalculatedVolume = 0;
|
|
|
|
m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
|
|
|
|
m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
|
|
|
|
m_asActiveSamples[i].m_nVolumeChange = -1;
|
|
|
|
m_asActiveSamples[i].m_nVolumeChange = -1;
|
|
|
@ -3680,7 +3680,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_sQueueSample.m_bVolume =
|
|
|
|
m_sQueueSample.m_bVolume =
|
|
|
|
ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
|
|
|
ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
|
|
|
if(!m_sQueueSample.m_bVolume) return 1;
|
|
|
|
if(!m_sQueueSample.m_bVolume) return true;
|
|
|
|
m_sQueueSample.m_nCounter = 40;
|
|
|
|
m_sQueueSample.m_nCounter = 40;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
|
|
|
|
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
|
|
|
|
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
|
|
|
@ -3747,7 +3747,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
|
|
|
|
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
|
|
|
|
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
|
|
|
|
m_sQueueSample.m_bVolume =
|
|
|
|
m_sQueueSample.m_bVolume =
|
|
|
|
ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
|
|
|
ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
|
|
|
if(!m_sQueueSample.m_bVolume) return 1;
|
|
|
|
if(!m_sQueueSample.m_bVolume) return true;
|
|
|
|
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
|
|
|
|
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
@ -3873,20 +3873,16 @@ cAudioManager::ProcessBridgeMotor()
|
|
|
|
void
|
|
|
|
void
|
|
|
|
cAudioManager::ProcessBridgeOneShots()
|
|
|
|
cAudioManager::ProcessBridgeOneShots()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_IS_UP &&
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_IS_UP && CBridge::OldState == STATE_LIFT_PART_MOVING_UP) {
|
|
|
|
CBridge::OldState == STATE_LIFT_PART_MOVING_UP) {
|
|
|
|
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_IS_DOWN &&
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_IS_DOWN && CBridge::OldState == STATE_LIFT_PART_MOVING_DOWN) {
|
|
|
|
CBridge::OldState == STATE_LIFT_PART_MOVING_DOWN) {
|
|
|
|
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_MOVING_UP &&
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_MOVING_UP && CBridge::OldState == STATE_LIFT_PART_ABOUT_TO_MOVE_UP) {
|
|
|
|
CBridge::OldState == STATE_LIFT_PART_ABOUT_TO_MOVE_UP) {
|
|
|
|
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_MOVING_DOWN &&
|
|
|
|
if(CBridge::State == STATE_LIFT_PART_MOVING_DOWN && CBridge::OldState == STATE_LIFT_PART_IS_UP) {
|
|
|
|
CBridge::OldState == STATE_LIFT_PART_IS_UP) {
|
|
|
|
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COL_CONTAINER_1;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -6001,14 +5997,14 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L:
|
|
|
|
male.m_pPed = nil;
|
|
|
|
male.m_pPed = nil;
|
|
|
|
male.m_bDistanceCalculated = 0;
|
|
|
|
male.m_bDistanceCalculated = false;
|
|
|
|
male.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos);
|
|
|
|
male.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos);
|
|
|
|
SetupPedComments(&male, SOUND_INJURED_PED_MALE_OUCH);
|
|
|
|
SetupPedComments(&male, SOUND_INJURED_PED_MALE_OUCH);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L:
|
|
|
|
case SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L:
|
|
|
|
female.m_pPed = nil;
|
|
|
|
female.m_pPed = nil;
|
|
|
|
female.m_bDistanceCalculated = 0;
|
|
|
|
female.m_bDistanceCalculated = false;
|
|
|
|
female.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos);
|
|
|
|
female.m_fDistance = GetDistanceSquared(&m_sQueueSample.m_vecPos);
|
|
|
|
SetupPedComments(&female, SOUND_INJURED_PED_FEMALE);
|
|
|
|
SetupPedComments(&female, SOUND_INJURED_PED_FEMALE);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -6330,7 +6326,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
weapon = params->m_pPed->GetWeapon();
|
|
|
|
weapon = params->m_pPed->GetWeapon();
|
|
|
|
for(uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
|
|
|
|
for(uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
|
|
|
|
noReflection = false;
|
|
|
|
noReflection = false;
|
|
|
|
stereo = 0;
|
|
|
|
stereo = false;
|
|
|
|
m_sQueueSample.m_bRequireReflection = false;
|
|
|
|
m_sQueueSample.m_bRequireReflection = false;
|
|
|
|
sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
|
|
|
|
sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
|
|
|
|
switch(sound) {
|
|
|
|
switch(sound) {
|
|
|
@ -6420,7 +6416,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -6451,7 +6447,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -6460,7 +6456,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6472,7 +6468,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_KICK_34:
|
|
|
|
case SOUND_FIGHT_KICK_34:
|
|
|
@ -6480,7 +6476,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6492,7 +6488,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_HEADBUTT_35:
|
|
|
|
case SOUND_FIGHT_HEADBUTT_35:
|
|
|
@ -6500,7 +6496,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6512,7 +6508,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_36:
|
|
|
|
case SOUND_FIGHT_PUNCH_36:
|
|
|
@ -6520,7 +6516,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6532,7 +6528,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_37:
|
|
|
|
case SOUND_FIGHT_PUNCH_37:
|
|
|
@ -6540,7 +6536,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6552,7 +6548,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_CLOSE_PUNCH_38:
|
|
|
|
case SOUND_FIGHT_CLOSE_PUNCH_38:
|
|
|
@ -6560,7 +6556,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6572,7 +6568,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_39:
|
|
|
|
case SOUND_FIGHT_PUNCH_39:
|
|
|
@ -6580,7 +6576,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6592,7 +6588,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_OR_KICK_BELOW_40:
|
|
|
|
case SOUND_FIGHT_PUNCH_OR_KICK_BELOW_40:
|
|
|
@ -6600,7 +6596,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6612,7 +6608,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_41:
|
|
|
|
case SOUND_FIGHT_PUNCH_41:
|
|
|
@ -6620,7 +6616,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6632,7 +6628,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_PUNCH_FROM_BEHIND_42:
|
|
|
|
case SOUND_FIGHT_PUNCH_FROM_BEHIND_42:
|
|
|
@ -6640,7 +6636,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_nFrequency = 18000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6652,7 +6648,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_KNEE_OR_KICK_43:
|
|
|
|
case SOUND_FIGHT_KNEE_OR_KICK_43:
|
|
|
@ -6660,7 +6656,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_nFrequency = 16500;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6672,7 +6668,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_FIGHT_KICK_44:
|
|
|
|
case SOUND_FIGHT_KICK_44:
|
|
|
@ -6680,7 +6676,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_nFrequency = 20000;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
m_sQueueSample.m_nCounter = iSound;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
++iSound;
|
|
|
|
++iSound;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6692,14 +6688,14 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_WEAPON_BAT_ATTACK:
|
|
|
|
case SOUND_WEAPON_BAT_ATTACK:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 3;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -6711,7 +6707,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[2] % 20 + 100;
|
|
|
|
emittingVol = m_anRandomTable[2] % 20 + 100;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -6724,7 +6720,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6739,7 +6735,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[1] % 10 + 90;
|
|
|
|
emittingVol = m_anRandomTable[1] % 10 + 90;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -6749,7 +6745,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6764,13 +6760,13 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WEAPONTYPE_SHOTGUN:
|
|
|
|
case WEAPONTYPE_SHOTGUN:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6785,7 +6781,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[2] % 10 + 100;
|
|
|
|
emittingVol = m_anRandomTable[2] % 10 + 100;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -6795,7 +6791,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_AK47_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_AK47_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6810,13 +6806,13 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WEAPONTYPE_M16:
|
|
|
|
case WEAPONTYPE_M16:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6831,13 +6827,13 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WEAPONTYPE_SNIPERRIFLE:
|
|
|
|
case WEAPONTYPE_SNIPERRIFLE:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6852,7 +6848,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[4] % 10 + 110;
|
|
|
|
emittingVol = m_anRandomTable[4] % 10 + 110;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -6862,7 +6858,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6877,7 +6873,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[0] % 20 + 80;
|
|
|
|
emittingVol = m_anRandomTable[0] % 20 + 80;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -6903,7 +6899,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex);
|
|
|
|
m_sQueueSample.m_nSampleIndex);
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 90;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 90;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 0;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = false;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeDivider = 6;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeDivider = 6;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
@ -6955,7 +6951,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
emittingVol = 75;
|
|
|
|
emittingVol = 75;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
|
|
|
|
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 5;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 5;
|
|
|
@ -6967,7 +6963,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 75;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 75;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_WEAPON_AK47_BULLET_ECHO:
|
|
|
|
case SOUND_WEAPON_AK47_BULLET_ECHO:
|
|
|
@ -6976,7 +6972,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_END_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_END_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_UZI_END_LEFT);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_UZI_END_LEFT);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -6991,7 +6987,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = m_anRandomTable[4] % 10 + 40;
|
|
|
|
emittingVol = m_anRandomTable[4] % 10 + 40;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
if(m_bDynamicAcousticModelingStatus)
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -7015,13 +7011,13 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
emittingVol = 70;
|
|
|
|
emittingVol = 70;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 70;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = 70;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_WEAPON_HIT_PED:
|
|
|
|
case SOUND_WEAPON_HIT_PED:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
@ -7036,13 +7032,13 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_SPLASH:
|
|
|
|
case SOUND_SPLASH:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
m_sQueueSample.m_nCounter = iSound++;
|
|
|
|
stereo = 1;
|
|
|
|
stereo = true;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
@ -7054,7 +7050,7 @@ cAudioManager::ProcessPedOneShots(cPedParams *params)
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_nLoopEnd = -1;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bEmittingVolume = emittingVol;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = 1;
|
|
|
|
m_sQueueSample.m_bReleasingSoundFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default: SetupPedComments(params, sound); continue;
|
|
|
|
default: SetupPedComments(params, sound); continue;
|
|
|
@ -7126,86 +7122,84 @@ cAudioManager::ProcessPlane(cVehicleParams *params)
|
|
|
|
struct tVehicleSampleData {
|
|
|
|
struct tVehicleSampleData {
|
|
|
|
eSfxSample m_nAccelerationSampleIndex;
|
|
|
|
eSfxSample m_nAccelerationSampleIndex;
|
|
|
|
uint8 m_bEngineSoundType;
|
|
|
|
uint8 m_bEngineSoundType;
|
|
|
|
char gap_5[3];
|
|
|
|
|
|
|
|
eSfxSample m_nHornSample;
|
|
|
|
eSfxSample m_nHornSample;
|
|
|
|
int32 m_nHornFrequency;
|
|
|
|
int32 m_nHornFrequency;
|
|
|
|
uint8 m_nSirenOrAlarmSample;
|
|
|
|
uint8 m_nSirenOrAlarmSample;
|
|
|
|
int32 m_nSirenOrAlarmFrequency;
|
|
|
|
int32 m_nSirenOrAlarmFrequency;
|
|
|
|
uint8 m_bDoorType;
|
|
|
|
uint8 m_bDoorType;
|
|
|
|
char gap_25[3];
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const tVehicleSampleData aVehicleSettings[70] = {
|
|
|
|
const tVehicleSampleData aVehicleSettings[70] = {
|
|
|
|
{SFX_CAR_REV_2, 2, "", SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 11487, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_8, 8, "", SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_ALARM_1, 10928, 1},
|
|
|
|
{SFX_CAR_REV_8, 8, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_ALARM_1, 10928, 1},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_ALARM_1, 8941, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 12893, SFX_CAR_ALARM_1, 8941, 0},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_BMW328, 10706, SFX_CAR_ALARM_1, 11922, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_BMW328, 10706, SFX_CAR_ALARM_1, 11922, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 7948, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 7948, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 11556, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 29711, SFX_POLICE_SIREN_SLOW, 11556, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_ALARM_1, 8941, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 31478, SFX_CAR_ALARM_1, 8941, 2},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_BMW328, 9538, SFX_CAR_ALARM_1, 12220, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_BMW328, 9538, SFX_CAR_ALARM_1, 12220, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_3, 3, "", SFX_CAR_HORN_BMW328, 12017, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_3, 3, SFX_CAR_HORN_BMW328, 12017, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, "", SFX_CAR_HORN_JEEP, 22295, SFX_CAR_ALARM_1, 12200, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, SFX_CAR_HORN_JEEP, 22295, SFX_CAR_ALARM_1, 12200, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_BUS2, 18000, SFX_CAR_ALARM_1, 13400, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_ALARM_1, 13400, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_BUS, 18286, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_BUS, 18286, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_3, 3, "", SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_ALARM_1, 13600, 1},
|
|
|
|
{SFX_CAR_REV_3, 3, SFX_CAR_HORN_PORSCHE, 11025, SFX_CAR_ALARM_1, 13600, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SIREN_SLOW, 8795, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_JEEP, 22295, SFX_AMBULANCE_SIREN_SLOW, 8795, 2},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 16168, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_PORSCHE, 9271, SFX_POLICE_SIREN_SLOW, 16168, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_ALARM_1, 8000, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 12170, SFX_CAR_ALARM_1, 8000, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_BUS2, 12345, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_BUS2, 12345, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_2, 2, "", SFX_CAR_HORN_BMW328, 10796, SFX_CAR_ALARM_1, 8543, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, SFX_CAR_HORN_BMW328, 10796, SFX_CAR_ALARM_1, 8543, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_PORSCHE, 9271, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_PORSCHE, 9271, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, "", SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_PICKUP, 11025, SFX_ICE_CREAM_TUNE, 11025, 0},
|
|
|
|
{SFX_CAR_REV_7, 7, "", SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_7, 7, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 10000, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 10000, 0},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 13596, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_BMW328, 10706, SFX_POLICE_SIREN_SLOW, 13596, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 13000, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_BUS, 17260, SFX_POLICE_SIREN_SLOW, 13000, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_8, 8, "", SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_ALARM_1, 10123, 1},
|
|
|
|
{SFX_CAR_REV_8, 8, SFX_CAR_HORN_PORSCHE, 10400, SFX_CAR_ALARM_1, 10123, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 13596, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 26513, SFX_POLICE_SIREN_SLOW, 13596, 0},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_BUS2, 11652, SFX_CAR_ALARM_1, 10554, 3},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_BUS2, 11652, SFX_CAR_ALARM_1, 10554, 3},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 8000, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 8000, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_1, 0, "", SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 9935, 3},
|
|
|
|
{SFX_CAR_REV_1, 0, SFX_CAR_HORN_TRUCK, 29711, SFX_CAR_ALARM_1, 9935, 3},
|
|
|
|
{SFX_CAR_REV_1, 0, "", SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CESNA_IDLE, 0, "", SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CESNA_IDLE, 0, SFX_CAR_HORN_JEEP, 26513, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_BUS, 16291, SFX_CAR_ALARM_1, 7500, 3},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_BUS, 16291, SFX_CAR_ALARM_1, 7500, 3},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_ALARM_1, 8935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 10233, SFX_CAR_ALARM_1, 8935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_ALARM_1, 8935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_PICKUP, 8670, SFX_CAR_ALARM_1, 8935, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, "", SFX_CAR_HORN_PICKUP, 2000, SFX_CAR_ALARM_1, 17000, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, SFX_CAR_HORN_PICKUP, 2000, SFX_CAR_ALARM_1, 17000, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_BMW328, 9003, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_BMW328, 9003, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, "", SFX_CAR_HORN_PORSCHE, 12375, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_2, 2, SFX_CAR_HORN_PORSCHE, 12375, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, "", SFX_CAR_HORN_BUS2, 15554, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_5, 5, SFX_CAR_HORN_BUS2, 15554, SFX_CAR_ALARM_1, 9935, 1},
|
|
|
|
{SFX_CAR_REV_7, 7, "", SFX_CAR_HORN_BUS2, 13857, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_7, 7, SFX_CAR_HORN_BUS2, 13857, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_7, 7, "", SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_7, 7, SFX_CAR_HORN_PICKUP, 10924, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_1, 0, "", SFX_CAR_HORN_JEEP, 20143, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 20143, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 0, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9000, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9000, 0},
|
|
|
|
{SFX_CAR_REV_6, 6, "", SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_6, 6, SFX_CAR_HORN_TRUCK, 28043, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_BUS, 18286, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_BUS, 18286, SFX_CAR_ALARM_1, 9935, 2},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_56CHEV, 10842, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_4, 4, "", SFX_CAR_HORN_BUS2, 18000, SFX_CAR_ALARM_1, 13400, 1},
|
|
|
|
{SFX_CAR_REV_4, 4, SFX_CAR_HORN_BUS2, 18000, SFX_CAR_ALARM_1, 13400, 1},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0},
|
|
|
|
{SFX_CAR_REV_1, 1, "", SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}};
|
|
|
|
{SFX_CAR_REV_1, 1, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, 0}};
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *automobile)
|
|
|
|
cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *automobile)
|
|
|
@ -7237,19 +7231,19 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
static int16 LastAccel = 0;
|
|
|
|
static int16 LastAccel = 0;
|
|
|
|
static int16 LastBrake = 0;
|
|
|
|
static int16 LastBrake = 0;
|
|
|
|
static uint8 CurrentPretendGear = 1;
|
|
|
|
static uint8 CurrentPretendGear = 1;
|
|
|
|
static bool bLostTractionLastFrame = 0;
|
|
|
|
static bool bLostTractionLastFrame = false;
|
|
|
|
static bool bHandbrakeOnLastFrame = 0;
|
|
|
|
static bool bHandbrakeOnLastFrame = 0;
|
|
|
|
static int32 nCruising = 0;
|
|
|
|
static int32 nCruising = 0;
|
|
|
|
static bool bAccelSampleStopped = 1;
|
|
|
|
static bool bAccelSampleStopped = true;
|
|
|
|
|
|
|
|
|
|
|
|
lostTraction = 0;
|
|
|
|
lostTraction = 0;
|
|
|
|
processedAccelSampleStopped = 0;
|
|
|
|
processedAccelSampleStopped = 0;
|
|
|
|
if(bPlayerJustEnteredCar) {
|
|
|
|
if(bPlayerJustEnteredCar) {
|
|
|
|
bAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = true;
|
|
|
|
bPlayerJustEnteredCar = false;
|
|
|
|
bPlayerJustEnteredCar = false;
|
|
|
|
nCruising = 0;
|
|
|
|
nCruising = 0;
|
|
|
|
LastAccel = 0;
|
|
|
|
LastAccel = 0;
|
|
|
|
bLostTractionLastFrame = 0;
|
|
|
|
bLostTractionLastFrame = false;
|
|
|
|
LastBrake = 0;
|
|
|
|
LastBrake = 0;
|
|
|
|
bHandbrakeOnLastFrame = 0;
|
|
|
|
bHandbrakeOnLastFrame = 0;
|
|
|
|
CurrentPretendGear = 1;
|
|
|
|
CurrentPretendGear = 1;
|
|
|
@ -7300,7 +7294,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
if(params->m_fVelocityChange < -0.001f) {
|
|
|
|
if(params->m_fVelocityChange < -0.001f) {
|
|
|
|
if(channelUsed) {
|
|
|
|
if(channelUsed) {
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
bAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
|
if(!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
|
lostTraction) {
|
|
|
|
lostTraction) {
|
|
|
@ -7315,7 +7309,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
} else if(LastAccel > 0) {
|
|
|
|
} else if(LastAccel > 0) {
|
|
|
|
if(channelUsed) {
|
|
|
|
if(channelUsed) {
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
bAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nCruising = 0;
|
|
|
|
nCruising = 0;
|
|
|
|
if(!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
|
if(!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
@ -7327,7 +7321,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(gasPedalAudio > 0.05f) {
|
|
|
|
if(gasPedalAudio > 0.05f) {
|
|
|
|
freq = (5000.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 19000;
|
|
|
|
freq = (5000.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 19000;
|
|
|
|
if(engineSoundType == 6) freq >>= 1;
|
|
|
|
if(engineSoundType == 6) freq /= 2;
|
|
|
|
AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) +
|
|
|
|
AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) +
|
|
|
|
40,
|
|
|
|
40,
|
|
|
|
freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1),
|
|
|
|
freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1),
|
|
|
@ -7370,10 +7364,10 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
automobile->m_fGasPedalAudio = accelerationMultipler;
|
|
|
|
automobile->m_fGasPedalAudio = accelerationMultipler;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
freq = freqModifier + baseFreq;
|
|
|
|
freq = freqModifier + baseFreq;
|
|
|
|
if(engineSoundType == 6) freq >>= 1;
|
|
|
|
if(engineSoundType == 6) freq /= 2;
|
|
|
|
if(channelUsed) {
|
|
|
|
if(channelUsed) {
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
SampleManager.StopChannel(m_bActiveSamples);
|
|
|
|
bAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AddPlayerCarSample(vol, freq, (engineSoundType + SFX_PHONE_RING), 0, 2, 1);
|
|
|
|
AddPlayerCarSample(vol, freq, (engineSoundType + SFX_PHONE_RING), 0, 2, 1);
|
|
|
|
LastAccel = accelerateState;
|
|
|
|
LastAccel = accelerateState;
|
|
|
@ -7390,7 +7384,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
CurrentPretendGear = gearNr;
|
|
|
|
CurrentPretendGear = gearNr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
processedAccelSampleStopped = 1;
|
|
|
|
processedAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = 0;
|
|
|
|
bAccelSampleStopped = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(channelUsed) {
|
|
|
|
if(channelUsed) {
|
|
|
|
SampleManager.SetChannelEmittingVolume(m_bActiveSamples, 85);
|
|
|
|
SampleManager.SetChannelEmittingVolume(m_bActiveSamples, 85);
|
|
|
@ -7421,11 +7415,9 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
SampleManager.SetChannelEmittingVolume(m_bActiveSamples, 85);
|
|
|
|
SampleManager.SetChannelEmittingVolume(m_bActiveSamples, 85);
|
|
|
|
SampleManager.SetChannel3DPosition(m_bActiveSamples, pos.x, pos.y, pos.z);
|
|
|
|
SampleManager.SetChannel3DPosition(m_bActiveSamples, pos.x, pos.y, pos.z);
|
|
|
|
SampleManager.SetChannel3DDistances(m_bActiveSamples, 50.f, 12.5f);
|
|
|
|
SampleManager.SetChannel3DDistances(m_bActiveSamples, 50.f, 12.5f);
|
|
|
|
if(engineSoundType == 6)
|
|
|
|
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
|
|
|
|
freq =
|
|
|
|
if (engineSoundType == 6)
|
|
|
|
(GearFreqAdj[CurrentPretendGear] + freqModifier + 22050) >> 1;
|
|
|
|
freq /= 2;
|
|
|
|
else
|
|
|
|
|
|
|
|
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
|
|
|
|
|
|
|
|
SampleManager.SetChannelFrequency(m_bActiveSamples, freq);
|
|
|
|
SampleManager.SetChannelFrequency(m_bActiveSamples, freq);
|
|
|
|
if(!channelUsed) {
|
|
|
|
if(!channelUsed) {
|
|
|
|
SampleManager.SetChannelReverbFlag(
|
|
|
|
SampleManager.SetChannelReverbFlag(
|
|
|
@ -7448,9 +7440,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
SampleManager.SetChannel3DPosition(m_bActiveSamples, pos.x, pos.y, pos.z);
|
|
|
|
SampleManager.SetChannel3DPosition(m_bActiveSamples, pos.x, pos.y, pos.z);
|
|
|
|
SampleManager.SetChannel3DDistances(m_bActiveSamples, 50.f, 12.5f);
|
|
|
|
SampleManager.SetChannel3DDistances(m_bActiveSamples, 50.f, 12.5f);
|
|
|
|
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
|
|
|
|
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
|
|
|
|
|
|
|
|
if(engineSoundType == 6)
|
|
|
|
if(engineSoundType == 6) freq >>= 1;
|
|
|
|
freq /= 2;
|
|
|
|
|
|
|
|
|
|
|
|
SampleManager.SetChannelFrequency(m_bActiveSamples, freq);
|
|
|
|
SampleManager.SetChannelFrequency(m_bActiveSamples, freq);
|
|
|
|
if(!channelUsed) {
|
|
|
|
if(!channelUsed) {
|
|
|
|
SampleManager.SetChannelReverbFlag(
|
|
|
|
SampleManager.SetChannelReverbFlag(
|
|
|
@ -7465,7 +7456,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nCruising = 1;
|
|
|
|
nCruising = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bAccelSampleStopped = 1;
|
|
|
|
bAccelSampleStopped = true;
|
|
|
|
if(accelerateState < 150 || !automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
|
if(accelerateState < 150 || !automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn ||
|
|
|
|
lostTraction || currentGear < params->m_pTransmission->nNumberOfGears - 1) {
|
|
|
|
lostTraction || currentGear < params->m_pTransmission->nNumberOfGears - 1) {
|
|
|
|
nCruising = 0;
|
|
|
|
nCruising = 0;
|
|
|
@ -7477,7 +7468,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
|
|
|
|
--nCruising;
|
|
|
|
--nCruising;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
freq = 27 * nCruising + freqModifier + 22050;
|
|
|
|
freq = 27 * nCruising + freqModifier + 22050;
|
|
|
|
if(engineSoundType == 6) freq >>= 1;
|
|
|
|
if(engineSoundType == 6) freq /= 2;
|
|
|
|
AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType,
|
|
|
|
AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType,
|
|
|
|
64, 1);
|
|
|
|
64, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -7538,7 +7529,7 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
|
|
|
|
m_sQueueSample.m_bReverbFlag = true;
|
|
|
|
m_sQueueSample.m_bReverbFlag = true;
|
|
|
|
m_sQueueSample.m_bRequireReflection = false;
|
|
|
|
m_sQueueSample.m_bRequireReflection = false;
|
|
|
|
AddSampleToRequestedQueue();
|
|
|
|
AddSampleToRequestedQueue();
|
|
|
|
params.m_bDistanceCalculated = 1;
|
|
|
|
params.m_bDistanceCalculated = true;
|
|
|
|
params.m_fDistance = distSquared;
|
|
|
|
params.m_fDistance = distSquared;
|
|
|
|
params.m_pPed = nil;
|
|
|
|
params.m_pPed = nil;
|
|
|
|
SetupPedComments(¶ms, SOUND_8A);
|
|
|
|
SetupPedComments(¶ms, SOUND_8A);
|
|
|
@ -7633,10 +7624,8 @@ cAudioManager::ProcessPornCinema(uint8 sound)
|
|
|
|
if(m_sQueueSample.m_bVolume) {
|
|
|
|
if(m_sQueueSample.m_bVolume) {
|
|
|
|
rand = m_anRandomTable[1] & 1;
|
|
|
|
rand = m_anRandomTable[1] & 1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = rand + sample;
|
|
|
|
m_sQueueSample.m_nSampleIndex = rand + sample;
|
|
|
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(
|
|
|
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
|
|
|
m_sQueueSample.m_nSampleIndex);
|
|
|
|
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
|
|
|
|
RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
|
|
|
|
|
|
|
|
m_sQueueSample.m_nCounter = rand + 1;
|
|
|
|
m_sQueueSample.m_nCounter = rand + 1;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_bIs2D = false;
|
|
|
|
m_sQueueSample.m_nLoopCount = 1;
|
|
|
|
m_sQueueSample.m_nLoopCount = 1;
|
|
|
@ -8169,9 +8158,9 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
|
|
|
|
automobile = (CAutomobile *)params->m_pVehicle;
|
|
|
|
automobile = (CAutomobile *)params->m_pVehicle;
|
|
|
|
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
|
|
|
|
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
|
|
|
|
for(int32 i = 0; i < ARRAY_SIZE(automobile->Doors); i++) {
|
|
|
|
for(int32 i = 0; i < ARRAY_SIZE(automobile->Doors); i++) {
|
|
|
|
if(automobile->Damage.GetDoorStatus(i) == 2) {
|
|
|
|
if(automobile->Damage.GetDoorStatus(i) == DOOR_STATUS_SWINGING) {
|
|
|
|
doorState = automobile->Doors[i].m_nDoorState;
|
|
|
|
doorState = automobile->Doors[i].m_nDoorState;
|
|
|
|
if(doorState == 1 || doorState == 2) {
|
|
|
|
if(doorState == DOOR_STATUS_SMASHED || doorState == DOOR_STATUS_SWINGING) {
|
|
|
|
velocity = Min(0.3f, Abs(automobile->Doors[i].m_fAngVel));
|
|
|
|
velocity = Min(0.3f, Abs(automobile->Doors[i].m_fAngVel));
|
|
|
|
if(velocity > 0.0035f) {
|
|
|
|
if(velocity > 0.0035f) {
|
|
|
|
emittingVol = (100.f * velocity * 10.f / 3.f);
|
|
|
|
emittingVol = (100.f * velocity * 10.f / 3.f);
|
|
|
@ -8481,7 +8470,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case 3: m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES; break;
|
|
|
|
case 3: m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES; break;
|
|
|
|
default: m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_CLOSE; break;
|
|
|
|
default: m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_CLOSE; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter =
|
|
|
|
m_sQueueSample.m_nCounter =
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] + 22;
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] + 22;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
@ -8507,7 +8496,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case 3: m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES; break;
|
|
|
|
case 3: m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES; break;
|
|
|
|
default: m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_OPEN; break;
|
|
|
|
default: m_sQueueSample.m_nSampleIndex = SFX_NEW_CAR_DOOR_OPEN; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter =
|
|
|
|
m_sQueueSample.m_nCounter =
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] + 10;
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] + 10;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
@ -8522,7 +8511,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case SOUND_CAR_WINDSHIELD_CRACK:
|
|
|
|
case SOUND_CAR_WINDSHIELD_CRACK:
|
|
|
|
maxDist = 900.f;
|
|
|
|
maxDist = 900.f;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 68;
|
|
|
|
m_sQueueSample.m_nCounter = 68;
|
|
|
|
emittingVol = m_anRandomTable[1] % 30 + 60;
|
|
|
|
emittingVol = m_anRandomTable[1] % 30 + 60;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
@ -8538,7 +8527,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]));
|
|
|
|
m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i]));
|
|
|
|
maxDist = 1225.f;
|
|
|
|
maxDist = 1225.f;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = iWheelIndex++;
|
|
|
|
m_sQueueSample.m_nCounter = iWheelIndex++;
|
|
|
|
if(iWheelIndex > 85) iWheelIndex = 82;
|
|
|
|
if(iWheelIndex > 85) iWheelIndex = 82;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
@ -8557,7 +8546,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
emittingVol = 60;
|
|
|
|
emittingVol = 60;
|
|
|
|
maxDist = 1600.f;
|
|
|
|
maxDist = 1600.f;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_CAR_STARTER;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_CAR_STARTER;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 33;
|
|
|
|
m_sQueueSample.m_nCounter = 33;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_CAR_STARTER);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_CAR_STARTER);
|
|
|
@ -8568,7 +8557,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_CAR_LIGHT_BREAK:
|
|
|
|
case SOUND_CAR_LIGHT_BREAK:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SHARD_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SHARD_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 37;
|
|
|
|
m_sQueueSample.m_nCounter = 37;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
9 * SampleManager.GetSampleBaseFrequency(SFX_GLASS_SHARD_1) / 10;
|
|
|
|
9 * SampleManager.GetSampleBaseFrequency(SFX_GLASS_SHARD_1) / 10;
|
|
|
@ -8587,7 +8576,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
m_sQueueSample.m_nFrequency = 13118;
|
|
|
|
m_sQueueSample.m_nFrequency = 13118;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SUSPENSION_FAST_MOVE;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SUSPENSION_FAST_MOVE;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 51;
|
|
|
|
m_sQueueSample.m_nCounter = 51;
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
m_sQueueSample.m_nFrequency +=
|
|
|
|
RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
|
|
|
|
RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
|
|
|
@ -8599,7 +8588,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_CAR_HYDRAULIC_3:
|
|
|
|
case SOUND_CAR_HYDRAULIC_3:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SUSPENSION_SLOW_MOVE_LOOP;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SUSPENSION_SLOW_MOVE_LOOP;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 86;
|
|
|
|
m_sQueueSample.m_nCounter = 86;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SUSPENSION_SLOW_MOVE_LOOP);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SUSPENSION_SLOW_MOVE_LOOP);
|
|
|
@ -8613,7 +8602,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_CAR_JERK:
|
|
|
|
case SOUND_CAR_JERK:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SHAG_SUSPENSION;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SHAG_SUSPENSION;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 87;
|
|
|
|
m_sQueueSample.m_nCounter = 87;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SHAG_SUSPENSION);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_SHAG_SUSPENSION);
|
|
|
@ -8636,7 +8625,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
900.f;
|
|
|
|
900.f;
|
|
|
|
m_sQueueSample.m_nSampleIndex =
|
|
|
|
m_sQueueSample.m_nSampleIndex =
|
|
|
|
(m_anRandomTable[0] & 1) + SFX_BOAT_SPLASH_1;
|
|
|
|
(m_anRandomTable[0] & 1) + SFX_BOAT_SPLASH_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = WaveIndex++;
|
|
|
|
m_sQueueSample.m_nCounter = WaveIndex++;
|
|
|
|
if(WaveIndex > 46) WaveIndex = 41;
|
|
|
|
if(WaveIndex > 46) WaveIndex = 41;
|
|
|
|
m_sQueueSample.m_nFrequency = (7000.f * relVol) + 6000;
|
|
|
|
m_sQueueSample.m_nFrequency = (7000.f * relVol) + 6000;
|
|
|
@ -8648,7 +8637,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_17:
|
|
|
|
case SOUND_17:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_THUMB_OFF;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_THUMB_OFF;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 47;
|
|
|
|
m_sQueueSample.m_nCounter = 47;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_POLICE_BOAT_THUMB_OFF) +
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_POLICE_BOAT_THUMB_OFF) +
|
|
|
@ -8663,7 +8652,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case SOUND_18:
|
|
|
|
case SOUND_18:
|
|
|
|
case SOUND_19:
|
|
|
|
case SOUND_19:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 59;
|
|
|
|
m_sQueueSample.m_nCounter = 59;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 11025;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 11025;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 5;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 5;
|
|
|
@ -8676,7 +8665,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
vol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
|
|
|
vol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
|
|
|
if(vol > 0.038400002f) vol = 0.038400002f;
|
|
|
|
if(vol > 0.038400002f) vol = 0.038400002f;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_TANK_TURRET;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_TANK_TURRET;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 79;
|
|
|
|
m_sQueueSample.m_nCounter = 79;
|
|
|
|
m_sQueueSample.m_nFrequency = (3000.f * vol * 26.041666f) + 9000;
|
|
|
|
m_sQueueSample.m_nFrequency = (3000.f * vol * 26.041666f) + 9000;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 2;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 2;
|
|
|
@ -8689,7 +8678,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_CAR_BOMB_TICK:
|
|
|
|
case SOUND_CAR_BOMB_TICK:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BOMB_BEEP;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_BOMB_BEEP;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 80;
|
|
|
|
m_sQueueSample.m_nCounter = 80;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_BOMB_BEEP);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_BOMB_BEEP);
|
|
|
@ -8702,7 +8691,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_PLANE_ON_GROUND:
|
|
|
|
case SOUND_PLANE_ON_GROUND:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_LAND_WHEELS;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_LAND_WHEELS;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 81;
|
|
|
|
m_sQueueSample.m_nCounter = 81;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_JUMBO_LAND_WHEELS);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_JUMBO_LAND_WHEELS);
|
|
|
@ -8716,7 +8705,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
emittingVol = m_anRandomTable[2];
|
|
|
|
emittingVol = m_anRandomTable[2];
|
|
|
|
maxDist = 14400.f;
|
|
|
|
maxDist = 14400.f;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = GunIndex++;
|
|
|
|
m_sQueueSample.m_nCounter = GunIndex++;
|
|
|
|
emittingVol = emittingVol % 15 + 65;
|
|
|
|
emittingVol = emittingVol % 15 + 65;
|
|
|
|
if(GunIndex > 58) GunIndex = 53;
|
|
|
|
if(GunIndex > 58) GunIndex = 53;
|
|
|
@ -8734,7 +8723,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
ARRAY_SIZE(m_anRandomTable)] %
|
|
|
|
ARRAY_SIZE(m_anRandomTable)] %
|
|
|
|
6 +
|
|
|
|
6 +
|
|
|
|
SFX_BULLET_CAR_1;
|
|
|
|
SFX_BULLET_CAR_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 34;
|
|
|
|
m_sQueueSample.m_nCounter = 34;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
|
|
|
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
|
|
|
@ -8751,7 +8740,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case SOUND_BOMB_ONIGNITION_ACTIVATED:
|
|
|
|
case SOUND_BOMB_ONIGNITION_ACTIVATED:
|
|
|
|
case SOUND_BOMB_TICK:
|
|
|
|
case SOUND_BOMB_TICK:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_ARM_BOMB;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_ARM_BOMB;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 36;
|
|
|
|
m_sQueueSample.m_nCounter = 36;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_ARM_BOMB);
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_ARM_BOMB);
|
|
|
@ -8763,16 +8752,16 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
maxDist = 2500.f;
|
|
|
|
maxDist = 2500.f;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_PED_HELI_PLAYER_FOUND:
|
|
|
|
case SOUND_PED_HELI_PLAYER_FOUND:
|
|
|
|
pedParams.m_pPed = 0;
|
|
|
|
pedParams.m_pPed = nil;
|
|
|
|
pedParams.m_bDistanceCalculated = 0;
|
|
|
|
pedParams.m_bDistanceCalculated = false;
|
|
|
|
pedParams.m_fDistance = 0.0f;
|
|
|
|
pedParams.m_fDistance = 0.0f;
|
|
|
|
pedParams.m_bDistanceCalculated = params->m_bDistanceCalculated;
|
|
|
|
pedParams.m_bDistanceCalculated = params->m_bDistanceCalculated;
|
|
|
|
pedParams.m_fDistance = params->m_fDistance;
|
|
|
|
pedParams.m_fDistance = params->m_fDistance;
|
|
|
|
SetupPedComments(&pedParams, SOUND_PED_HELI_PLAYER_FOUND);
|
|
|
|
SetupPedComments(&pedParams, SOUND_PED_HELI_PLAYER_FOUND);
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
case SOUND_PED_BODYCAST_HIT:
|
|
|
|
case SOUND_PED_BODYCAST_HIT:
|
|
|
|
pedParams.m_pPed = 0;
|
|
|
|
pedParams.m_pPed = nil;
|
|
|
|
pedParams.m_bDistanceCalculated = 0;
|
|
|
|
pedParams.m_bDistanceCalculated = false;
|
|
|
|
pedParams.m_fDistance = 0.0f;
|
|
|
|
pedParams.m_fDistance = 0.0f;
|
|
|
|
pedParams.m_bDistanceCalculated = params->m_bDistanceCalculated;
|
|
|
|
pedParams.m_bDistanceCalculated = params->m_bDistanceCalculated;
|
|
|
|
pedParams.m_fDistance = params->m_fDistance;
|
|
|
|
pedParams.m_fDistance = params->m_fDistance;
|
|
|
@ -8780,7 +8769,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
case SOUND_WATER_FALL:
|
|
|
|
case SOUND_WATER_FALL:
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 15;
|
|
|
|
m_sQueueSample.m_nCounter = 15;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 16000;
|
|
|
|
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 16000;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
@ -8792,7 +8781,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SOUND_SPLATTER:
|
|
|
|
case SOUND_SPLATTER:
|
|
|
|
m_sQueueSample.m_nSampleIndex = CrunchOffset + SFX_PED_CRUNCH_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = CrunchOffset + SFX_PED_CRUNCH_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 48;
|
|
|
|
m_sQueueSample.m_nCounter = 48;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_PED_CRUNCH_1) +
|
|
|
|
SampleManager.GetSampleBaseFrequency(SFX_PED_CRUNCH_1) +
|
|
|
@ -8809,15 +8798,13 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
|
|
|
|
case SOUND_CAR_PED_COLLISION:
|
|
|
|
case SOUND_CAR_PED_COLLISION:
|
|
|
|
vol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
|
|
|
vol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
|
|
|
|
if(20.f < vol) vol = 20.f;
|
|
|
|
if(20.f < vol) vol = 20.f;
|
|
|
|
emittingVol = (vol * 0.05f * 127.f);
|
|
|
|
emittingVol = (vol / 20.0f * 127.f);
|
|
|
|
if(!emittingVol) continue;
|
|
|
|
if(!emittingVol) continue;
|
|
|
|
|
|
|
|
|
|
|
|
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[2] & 3) + SFX_FIGHT_1;
|
|
|
|
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[2] & 3) + SFX_FIGHT_1;
|
|
|
|
m_sQueueSample.m_bBankIndex = 0;
|
|
|
|
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
|
|
|
|
m_sQueueSample.m_nCounter = 50;
|
|
|
|
m_sQueueSample.m_nCounter = 50;
|
|
|
|
m_sQueueSample.m_nFrequency =
|
|
|
|
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
|
|
|
|
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) >>
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 1;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
|
|
|
|
m_sQueueSample.m_fSoundIntensity = 40.0f;
|
|
|
|
m_sQueueSample.m_fSoundIntensity = 40.0f;
|
|
|
@ -9168,7 +9155,7 @@ cAudioManager::ProcessWeather(int32 id)
|
|
|
|
vol = (m_asAudioEntities[id].m_afVolume[0]) + 35;
|
|
|
|
vol = (m_asAudioEntities[id].m_afVolume[0]) + 35;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_sQueueSample.m_bVolume = vol;
|
|
|
|
m_sQueueSample.m_bVolume = vol;
|
|
|
|
if(TheCamera.SoundDistUp < 20.f) m_sQueueSample.m_bVolume >>= 1;
|
|
|
|
if(TheCamera.SoundDistUp < 20.f) m_sQueueSample.m_bVolume /= 2;
|
|
|
|
if(counter == 4) counter = 0;
|
|
|
|
if(counter == 4) counter = 0;
|
|
|
|
m_sQueueSample.m_nCounter = counter++;
|
|
|
|
m_sQueueSample.m_nCounter = counter++;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 0;
|
|
|
|
m_sQueueSample.m_nReleasingVolumeModificator = 0;
|
|
|
|