aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/AudioManager.h')
-rw-r--r--src/audio/AudioManager.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 49edcfec..71c99ff3 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -59,6 +59,7 @@ public:
#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
int8 m_nEmittingVolumeChange; // same as above but for m_nEmittingVolume
#endif
+ uint8 field_51_lcs;
};
VALIDATE_SIZE(tSound, 96);
@@ -126,7 +127,11 @@ public:
VALIDATE_SIZE(cPedComments, 0x490);
+#ifdef FIX_BUGS // LCS extends the number of mission slots but not audio channels, the game would crash on ClearMissionAudio trying to stop channels that don't exist
#define MISSION_AUDIO_SLOTS (2)
+#else
+#define MISSION_AUDIO_SLOTS (5)
+#endif
// name made up
class cAudioScriptObjectManager
@@ -248,6 +253,7 @@ public:
#endif
cAudioScriptObjectManager m_sAudioScriptObjectManager;
+ bool8 field_4348_lcs;
// miami
bool8 m_bIsPlayerShutUp;
uint8 m_nPlayerMood;
@@ -291,6 +297,10 @@ public:
bool8 m_bWasPaused;
uint32 m_FrameCounter;
+ uint32 field_5644_lcs;
+ uint32 field_5648_lcs;
+ uint8 field_564C_lcs;
+
cAudioManager();
~cAudioManager();
@@ -338,7 +348,7 @@ public:
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier);
int32 RandomDisplacement(uint32 seed);
void InterrogateAudioEntities(); // inlined
- void AddSampleToRequestedQueue();
+ void AddSampleToRequestedQueue(uint8 unk_lcs = 0);
void AddDetailsToRequestedOrderList(uint8 sample); // inlined in vc
#ifdef AUDIO_REFLECTIONS
void AddReflectionsToRequestedQueue();
@@ -352,6 +362,7 @@ public:
#ifdef GTA_PS2
void LoadBankIfNecessary(uint8 bank); // this is used only on PS2 but technically not a platform code
#endif
+ void DirectlyEnqueueSample(uint32 sample, uint8 bank, uint32 counter, uint32 priority, uint32 freq, uint8 volume, uint8 framesToPlay, uint32 notStereo = 0);
#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well
void AdjustSamplesVolume(); // inlined
@@ -407,6 +418,7 @@ public:
#ifdef GTA_TRAIN
bool8 ProcessTrainNoise(cVehicleParams &params);
#endif
+ bool8 ProcessFerryNoise(cVehicleParams &params);
bool8 ProcessBoatEngine(cVehicleParams &params);
bool8 ProcessBoatMovingOverWater(cVehicleParams &params);
void ProcessPlane(cVehicleParams &params);
@@ -436,6 +448,17 @@ public:
uint32 GetPedCommentSfx(CPed *ped, uint16 sound);
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset);
uint32 GetPlayerTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetMariaTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetDonaldLoveTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetJdOtooleTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetleonMcaffreyTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetSalvatoreTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetToshikoTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetMickeyHamfistsTalkSfx(CPed *ped, uint16 sound);
+ uint32 GetBiker1TalkSfx(CPed *ped, uint16 sound);
+ uint32 GetBiker2TalkSfx(CPed *ped, uint16 sound);
+ uint32 GetGrdAng1TalkSfx(CPed *ped, uint16 sound);
+ uint32 GetGrdAng2TalkSfx(CPed *ped, uint16 sound);
uint32 GetGenericMaleTalkSfx(CPed *ped, uint16 sound); // inlined in vc
uint32 GetGenericFemaleTalkSfx(CPed *ped, uint16 sound); // inlined in vc
uint32 GetDefaultTalkSfx(CPed *ped, uint16 sound);
@@ -556,9 +579,6 @@ public:
#ifdef GTA_BRIDGE
void ProcessBridge();
- void ProcessBridgeWarning();
- void ProcessBridgeMotor();
- void ProcessBridgeOneShots();
#endif
// mission audio
@@ -635,10 +655,15 @@ public:
#define SET_SOUND_REVERB(b)
#endif
-#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS)
-static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
+#ifndef GTA_PS2
+#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples
#endif
+//#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS)
+//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
+//#endif
+
+
extern cAudioManager AudioManager;
enum