summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-23 15:14:30 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:43 +0200
commit7a2dbd9112d9537453bb51a503858b769af32204 (patch)
treea22d211dbc943a08b64449e57961230736de671f /src/audio/AudioManager.cpp
parentThis means sound should be panned right, not volume (diff)
downloadre3-7a2dbd9112d9537453bb51a503858b769af32204.tar
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.gz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.bz2
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.lz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.xz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.zst
re3-7a2dbd9112d9537453bb51a503858b769af32204.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 8d9d867d..1f758dd2 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -13,10 +13,6 @@
cAudioManager AudioManager;
-const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
-const int policeChannel = channels + 1;
-const int allChannels = channels + 2;
-
#define SPEED_OF_SOUND 343.f
#define TIME_SPENT 50
@@ -26,7 +22,7 @@ cAudioManager::cAudioManager()
m_bReverb = TRUE;
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
m_nTimeSpent = TIME_SPENT;
- m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
+ m_nActiveSamples = NUM_CHANNELS_GENERIC;
m_nActiveSampleQueue = 1;
ClearRequestedQueue();
m_nActiveSampleQueue = 0;
@@ -267,7 +263,7 @@ cAudioManager::ResetTimers(uint32 time)
}
ClearActiveSamples();
ClearMissionAudio();
- SampleManager.StopChannel(policeChannel);
+ SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
SampleManager.SetEffectsFadeVolume(0);
SampleManager.SetMusicFadeVolume(0);
MusicManager.ResetMusicAfterReload();
@@ -429,7 +425,7 @@ cAudioManager::ServiceSoundEffects()
{
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
- for (int32 i = 0; i < allChannels; i++)
+ for (int32 i = 0; i < NUM_CHANNELS; i++)
SampleManager.StopChannel(i);
ClearRequestedQueue();
@@ -692,7 +688,12 @@ cAudioManager::UpdateReflections()
void
cAudioManager::AddReleasingSounds()
{
- bool8 toProcess[44]; // why not 27? because PS2?
+ // in case someone would want to increase it
+#ifdef FIX_BUGS
+ bool8 toProcess[NUM_CHANNELS_GENERIC];
+#else
+ bool8 toProcess[44];
+#endif
int8 queue = m_nActiveSampleQueue == 0 ? 1 : 0;