summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-30 23:58:24 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-07-04 01:02:00 +0200
commit9357e5cc83f0a0df1fa259d3194a0b13cbfb374f (patch)
treeba7d2d083ee0c91f3049913902b86be26a9574c1 /src/audio/AudioManager.cpp
parentPlayerJustGotInCar (diff)
downloadre3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar.gz
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar.bz2
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar.lz
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar.xz
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.tar.zst
re3-9357e5cc83f0a0df1fa259d3194a0b13cbfb374f.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp89
1 files changed, 48 insertions, 41 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index acf17afe..89d8332a 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -3,6 +3,7 @@
#include "ModelIndices.h"
#include "Ped.h"
#include "PlayerPed.h"
+#include "SampleManager.h"
#include "World.h"
#include "common.h"
#include "patcher.h"
@@ -12,44 +13,20 @@ cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
constexpr int totalAudioEntitiesSlots = 200;
void
-cAudioManager::SetEntityStatus(int32 id, bool status)
+cAudioManager::ReleaseDigitalHandle()
{
- if(m_bIsInitialised && id >= 0 && id < totalAudioEntitiesSlots) {
- if(m_asAudioEntities[id].m_bIsUsed) { m_asAudioEntities[id].m_bStatus = status; }
- }
+ if(m_bIsInitialised) { cSampleManager.ReleaseDigitalHandle(); }
}
-void
-cAudioManager::PreTerminateGameSpecificShutdown()
+void cAudioManager::SetDynamicAcousticModelingStatus(bool status)
{
- if(m_nBridgeEntity >= 0) {
- DestroyEntity(m_nBridgeEntity);
- m_nBridgeEntity = -5;
- }
- if(m_nPoliceChannelEntity >= 0) {
- DestroyEntity(m_nPoliceChannelEntity);
- m_nPoliceChannelEntity = -5;
- }
- if(m_nWaterCannonEntity >= 0) {
- DestroyEntity(m_nWaterCannonEntity);
- m_nWaterCannonEntity = -5;
- }
- if(m_nFireAudioEntity >= 0) {
- DestroyEntity(m_nFireAudioEntity);
- m_nFireAudioEntity = -5;
- }
- if(m_nCollisionEntity >= 0) {
- DestroyEntity(m_nCollisionEntity);
- m_nCollisionEntity = -5;
- }
- if(m_nFrontEndEntity >= 0) {
- DestroyEntity(m_nFrontEndEntity);
- m_nFrontEndEntity = -5;
- }
- if(m_nProjectileEntity >= 0) {
- DestroyEntity(m_nProjectileEntity);
- m_nProjectileEntity = -5;
- }
+ m_bDynamicAcousticModelingStatus = status;
+}
+
+bool
+cAudioManager::IsAudioInitialised() const
+{
+ return m_bIsInitialised;
}
int32
@@ -97,20 +74,50 @@ cAudioManager::DestroyEntity(int32 id)
}
void
-cAudioManager::PostTerminateGameSpecificShutdown()
+cAudioManager::SetEntityStatus(int32 id, bool status)
{
- ;
+ if(m_bIsInitialised && id >= 0 && id < totalAudioEntitiesSlots) {
+ if(m_asAudioEntities[id].m_bIsUsed) { m_asAudioEntities[id].m_bStatus = status; }
+ }
}
-bool
-cAudioManager::IsAudioInitialised() const
+void
+cAudioManager::PreTerminateGameSpecificShutdown()
{
- return m_bIsInitialised;
+ if(m_nBridgeEntity >= 0) {
+ DestroyEntity(m_nBridgeEntity);
+ m_nBridgeEntity = -5;
+ }
+ if(m_nPoliceChannelEntity >= 0) {
+ DestroyEntity(m_nPoliceChannelEntity);
+ m_nPoliceChannelEntity = -5;
+ }
+ if(m_nWaterCannonEntity >= 0) {
+ DestroyEntity(m_nWaterCannonEntity);
+ m_nWaterCannonEntity = -5;
+ }
+ if(m_nFireAudioEntity >= 0) {
+ DestroyEntity(m_nFireAudioEntity);
+ m_nFireAudioEntity = -5;
+ }
+ if(m_nCollisionEntity >= 0) {
+ DestroyEntity(m_nCollisionEntity);
+ m_nCollisionEntity = -5;
+ }
+ if(m_nFrontEndEntity >= 0) {
+ DestroyEntity(m_nFrontEndEntity);
+ m_nFrontEndEntity = -5;
+ }
+ if(m_nProjectileEntity >= 0) {
+ DestroyEntity(m_nProjectileEntity);
+ m_nProjectileEntity = -5;
+ }
}
-void cAudioManager::SetDynamicAcousticModelingStatus(bool status)
+void
+cAudioManager::PostTerminateGameSpecificShutdown()
{
- m_bDynamicAcousticModelingStatus = status;
+ ;
}
void