summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioLogic.cpp1
-rw-r--r--src/audio/AudioScriptObject.cpp10
-rw-r--r--src/audio/AudioScriptObject.h3
-rw-r--r--src/audio/DMAudio.cpp4
-rw-r--r--src/audio/audio_enums.h3
-rw-r--r--src/audio/sampman_oal.cpp6
-rw-r--r--src/audio/soundlist.h6
7 files changed, 23 insertions, 10 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index b814d58c..98ebf0d8 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -2756,7 +2756,6 @@ cAudioManager::ProcessPlane(cVehicleParams *params)
ProcessCesna(params);
break;
default:
- debug("Plane Model Id is %d\n, ", params->m_pVehicle->GetModelIndex());
break;
}
}
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index 69d80fbc..ac30f757 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -4,6 +4,16 @@
#include "Pools.h"
#include "DMAudio.h"
+cAudioScriptObject::cAudioScriptObject()
+{
+ Reset();
+};
+
+cAudioScriptObject::~cAudioScriptObject()
+{
+ Reset();
+};
+
void
cAudioScriptObject::Reset()
{
diff --git a/src/audio/AudioScriptObject.h b/src/audio/AudioScriptObject.h
index ff36474d..8110b2bb 100644
--- a/src/audio/AudioScriptObject.h
+++ b/src/audio/AudioScriptObject.h
@@ -7,6 +7,9 @@ public:
CVector Posn;
int32 AudioEntity;
+ cAudioScriptObject();
+ ~cAudioScriptObject();
+
void Reset(); /// ok
static void* operator new(size_t);
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 6859cba3..b3c16941 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -247,7 +247,7 @@ cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
int32
cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
{
- int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
+ int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
AudioManager.SetEntityStatus(audioEntity, true);
@@ -264,7 +264,7 @@ cDMAudio::DestroyLoopingScriptObject(int32 audioEntity)
void
cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
{
- int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject);
+ int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
{
diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h
index 1f13521b..375c4a70 100644
--- a/src/audio/audio_enums.h
+++ b/src/audio/audio_enums.h
@@ -12,7 +12,8 @@ enum eRadioStation
EMOTION,
WAVE,
USERTRACK,
- POLICE_RADIO,
+ NUM_RADIOS = 10,
+ POLICE_RADIO = 10,
//TAXI_RADIO,
RADIO_OFF,
};
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index a2943aff..ffa4c456 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -587,16 +587,16 @@ cSampleManager::Initialise(void)
}
nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] = (uintptr)malloc(nSampleBankSize[SAMPLEBANK_MAIN]);
- ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] != NULL);
+ ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] != 0);
- if ( nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] == NULL )
+ if ( nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] == 0 )
{
Terminate();
return false;
}
nSampleBankMemoryStartAddress[SAMPLEBANK_PED] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX);
- ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] != NULL);
+ ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] != 0);
}
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index 2a5b83cf..bc9ac09a 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -146,9 +146,9 @@ enum eSound : uint16
SOUND_PED_LEAVE_VEHICLE,
SOUND_PED_EVADE,
SOUND_PED_FLEE_RUN,
- SOUND_PED_CAR_COLLISION,
- SOUND_PED_BOAT_COLLISION,
- SOUND_PED_HORN_ACTIVE,
+ SOUND_PED_CRASH_VEHICLE,
+ SOUND_PED_CRASH_CAR,
+ SOUND_PED_ANNOYED_DRIVER,
SOUND_PED_147,
SOUND_PED_SOLICIT,
SOUND_PED_149,