mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 16:50:07 +00:00
rewieved some audio functions
This commit is contained in:
parent
e54b540bd4
commit
63e5faef11
|
@ -35,4 +35,4 @@ public:
|
||||||
void AddCollisionToRequestedQueue();
|
void AddCollisionToRequestedQueue();
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cAudioCollisionManager, 852);
|
VALIDATE_SIZE(cAudioCollisionManager, 0x354);
|
||||||
|
|
|
@ -510,7 +510,7 @@ cAudioManager::ComputePan(float dist, CVector *vec)
|
||||||
return Min(107, PanTable[index] + 63);
|
return Min(107, PanTable[index] + 63);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
uint32
|
||||||
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
||||||
{
|
{
|
||||||
uint32 newFreq = oldFreq;
|
uint32 newFreq = oldFreq;
|
||||||
|
@ -519,11 +519,7 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
|
||||||
if (dist != 0.0f) {
|
if (dist != 0.0f) {
|
||||||
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
||||||
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
||||||
if (speedOfSource < 0.0f) {
|
speedOfSource = clamp2(speedOfSource, 0.0f, 1.5f);
|
||||||
speedOfSource = Max(speedOfSource, -1.5f);
|
|
||||||
} else {
|
|
||||||
speedOfSource = Min(speedOfSource, 1.5f);
|
|
||||||
}
|
|
||||||
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -952,7 +948,7 @@ cAudioManager::ClearRequestedQueue()
|
||||||
void
|
void
|
||||||
cAudioManager::ClearActiveSamples()
|
cAudioManager::ClearActiveSamples()
|
||||||
{
|
{
|
||||||
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
for (uint8 i = 0; i < m_nActiveSamples; i++) {
|
||||||
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
m_asActiveSamples[i].m_nCounter = 0;
|
m_asActiveSamples[i].m_nCounter = 0;
|
||||||
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
||||||
|
|
|
@ -250,14 +250,14 @@ public:
|
||||||
|
|
||||||
void CalculateDistance(bool &condition, float dist); //done
|
void CalculateDistance(bool &condition, float dist); //done
|
||||||
bool CheckForAnAudioFileOnCD() const;
|
bool CheckForAnAudioFileOnCD() const;
|
||||||
void ClearActiveSamples();
|
void ClearActiveSamples(); //done
|
||||||
void ClearMissionAudio(uint8 slot);
|
void ClearMissionAudio(uint8 slot); //done
|
||||||
void ClearRequestedQueue();
|
void ClearRequestedQueue();
|
||||||
int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
|
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
|
||||||
float speedMultiplier) const;
|
float speedMultiplier) const; //done
|
||||||
int32 ComputePan(float, CVector *);
|
int32 ComputePan(float, CVector *);
|
||||||
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const;
|
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const;
|
||||||
int32 CreateEntity(eAudioType type, void *entity);
|
int32 CreateEntity(eAudioType type, void *entity); //done
|
||||||
|
|
||||||
void DestroyAllGameCreatedEntities();
|
void DestroyAllGameCreatedEntities();
|
||||||
void DestroyEntity(int32 id);
|
void DestroyEntity(int32 id);
|
||||||
|
@ -311,7 +311,7 @@ public:
|
||||||
void PreloadMissionAudio(uint8 slot, Const char *name);
|
void PreloadMissionAudio(uint8 slot, Const char *name);
|
||||||
void PreTerminateGameSpecificShutdown(); //done
|
void PreTerminateGameSpecificShutdown(); //done
|
||||||
/// processX - main logic of adding new sounds
|
/// processX - main logic of adding new sounds
|
||||||
void ProcessActiveQueues();
|
void ProcessActiveQueues(); //done
|
||||||
bool ProcessAirBrakes(cVehicleParams *params);
|
bool ProcessAirBrakes(cVehicleParams *params);
|
||||||
bool ProcessBoatEngine(cVehicleParams *params);
|
bool ProcessBoatEngine(cVehicleParams *params);
|
||||||
bool ProcessBoatMovingOverWater(cVehicleParams *params);
|
bool ProcessBoatMovingOverWater(cVehicleParams *params);
|
||||||
|
|
|
@ -43,4 +43,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cPoliceRadioQueue, 444);
|
VALIDATE_SIZE(cPoliceRadioQueue, 0x1BC);
|
||||||
|
|
Loading…
Reference in a new issue