From ee89c485fcce7f3b9a189f7a80b3a1b2933f79bd Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 24 Jan 2021 13:42:45 +0300 Subject: sync --- src/audio/AudioLogic.cpp | 7 ++++--- src/audio/AudioManager.h | 6 +++--- src/audio/PoliceRadio.cpp | 1 + src/audio/PoliceRadio.h | 2 +- src/audio/sampman.h | 1 - src/audio/sampman_miles.cpp | 6 ++---- src/audio/sampman_oal.cpp | 35 ++++++++++++++++------------------- 7 files changed, 27 insertions(+), 31 deletions(-) (limited to 'src/audio') diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index c2050f59..36b9eb11 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -41,7 +41,7 @@ #include "WindModifiers.h" #include "Fluff.h" #include "Script.h" - +#include "Wanted.h" const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples); const int policeChannel = channels + 1; @@ -9311,7 +9311,8 @@ cAudioManager::ProcessBridge() void cAudioManager::ProcessBridgeWarning() { - if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) { + // TODO: LCS +/* if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) { m_sQueueSample.m_nVolume = ComputeVolume(100, 450.f, m_sQueueSample.m_fDistance); if (m_sQueueSample.m_nVolume != 0) { m_sQueueSample.m_nCounter = 0; @@ -9332,7 +9333,7 @@ cAudioManager::ProcessBridgeWarning() m_sQueueSample.m_bRequireReflection = false; AddSampleToRequestedQueue(); } - } + }*/ } void diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index b5e9b499..f715fb45 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -544,8 +544,8 @@ public: #endif }; -#ifdef AUDIO_MSS -static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); -#endif +//#ifdef AUDIO_MSS +//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error"); +//#endif extern cAudioManager AudioManager; diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp index a2a765ed..edfb8a7c 100644 --- a/src/audio/PoliceRadio.cpp +++ b/src/audio/PoliceRadio.cpp @@ -13,6 +13,7 @@ #include "World.h" #include "Zones.h" #include "sampman.h" +#include "Wanted.h" const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples); const int policeChannel = channels + 1; diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h index e9a0fde0..d7c928e2 100644 --- a/src/audio/PoliceRadio.h +++ b/src/audio/PoliceRadio.h @@ -1,6 +1,6 @@ #pragma once -#include "Wanted.h" +#include "Crime.h" struct cAMCrime { int32 type; diff --git a/src/audio/sampman.h b/src/audio/sampman.h index 7597eafb..697a7aa8 100644 --- a/src/audio/sampman.h +++ b/src/audio/sampman.h @@ -1,5 +1,4 @@ #pragma once -#include "common.h" #include "AudioSamples.h" #define MAX_VOLUME 127 diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 44be3b1c..d78c6d84 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1,8 +1,5 @@ -#include "common.h" - #ifdef AUDIO_MSS -#include -#include +#include #include #include @@ -11,6 +8,7 @@ #include "eax-util.h" #include "mss.h" +#include "common.h" #include "sampman.h" #include "AudioManager.h" #include "MusicManager.h" diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index ec85fc43..7da871a5 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -1,17 +1,11 @@ //#define JUICY_OAL #ifdef AUDIO_OAL -#include "sampman.h" - #include #include "eax.h" #include "eax-util.h" -#define WITHWINDOWS -#include "common.h" -#include "crossplatform.h" - #ifdef _WIN32 #include #include @@ -19,8 +13,24 @@ #include #include #include + +// for user MP3s +#include +#include +#include +#else +#define _getcwd getcwd +#endif + +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK +#pragma comment( lib, "OpenAL32.lib" ) #endif +#include "common.h" +#include "crossplatform.h" + +#include "sampman.h" + #include "oal/oal_utils.h" #include "oal/aldlist.h" #include "oal/channel.h" @@ -38,19 +48,6 @@ //TODO: max channels //TODO: loop count -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK -#pragma comment( lib, "OpenAL32.lib" ) -#endif - -// for user MP3s -#ifdef _WIN32 -#include -#include -#include -#else -#define _getcwd getcwd -#endif - cSampleManager SampleManager; bool _bSampmanInitialised = false; -- cgit v1.2.3