From 74867af2e73b8cbbef97ff9395c3b0b157ec79ee Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 24 Jun 2021 21:50:09 +0300 Subject: Fixes --- src/audio/AudioManager.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/audio/AudioManager.h') diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 7f497e85..5c142f5d 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -471,7 +471,7 @@ public: void ProcessScriptObject(int32 id); // done void ProcessSpecial(); // done #ifdef GTA_TRAIN - bool ProcessTrainNoise(cVehicleParams ¶ms); //done(bcs not exists in VC) + bool8 ProcessTrainNoise(cVehicleParams ¶ms); //done(bcs not exists in VC) #endif void ProcessVehicle(CVehicle *vehicle); // done bool8 ProcessVehicleDoors(cVehicleParams ¶ms); // done @@ -549,7 +549,24 @@ public: #endif }; -//#ifdef AUDIO_MSS +/* + Manual loop points are not on PS2 so let's have these macros to avoid massive ifndefs. + Setting these manually was pointless anyway since they never change from sdt values. + What were they thinking? +*/ +#ifndef GTA_PS2 +#define RESET_LOOP_OFFSETS \ + m_sQueueSample.m_nLoopStart = 0; \ + m_sQueueSample.m_nLoopEnd = -1; +#define SET_LOOP_OFFSETS(sample) \ + m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(sample); \ + m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(sample); +#else +#define RESET_LOOP_OFFSETS +#define SET_LOOP_OFFSETS(sample) +#endif + +//#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS) //static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); //#endif What were they thinking? -- cgit v1.2.3