summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-25 08:07:41 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-25 08:07:41 +0200
commit800ab9296056ceeb384985cb223566c981813919 (patch)
tree53e8190b7bb84a7b960abcec3044ce7cc2d73fbf /src/audio/AudioManager.h
parentmodelinfo bits (diff)
parentAudio: refactoring, type fixes, renaming cAudioManager fields (diff)
downloadre3-800ab9296056ceeb384985cb223566c981813919.tar
re3-800ab9296056ceeb384985cb223566c981813919.tar.gz
re3-800ab9296056ceeb384985cb223566c981813919.tar.bz2
re3-800ab9296056ceeb384985cb223566c981813919.tar.lz
re3-800ab9296056ceeb384985cb223566c981813919.tar.xz
re3-800ab9296056ceeb384985cb223566c981813919.tar.zst
re3-800ab9296056ceeb384985cb223566c981813919.zip
Diffstat (limited to 'src/audio/AudioManager.h')
-rw-r--r--src/audio/AudioManager.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 4cebe118..73920d42 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -44,14 +44,21 @@ public:
// 63 = L 100% R 100%
// 127 = L 0% R 100%
uint8 m_nFrontRearPan; // Used on PS2 for surround panning
+#ifndef FIX_BUGS
uint32 m_nFramesToPlay; // Number of frames the sound would be played (if it stops being queued).
// This one is being set by queued sample for looping sounds, otherwise calculated inside AudioManager
+#else
+ float m_nFramesToPlay; // Made into float for high fps fix
+#endif
// all fields below are internal to AudioManager calculations and aren't set by queued sample
bool8 m_bIsBeingPlayed; // Set to TRUE when the sound was added or changed on current frame to avoid it being overwritten
bool8 m_bIsPlayingFinished; // Not sure about the name. Set to TRUE when sampman channel becomes free
uint32 m_nFinalPriority; // Actual value used to compare priority, calculated using volume and m_nPriority. Lesser value means higher priority
int8 m_nVolumeChange; // How much m_nVolume should reduce per each frame.
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ int8 m_nEmittingVolumeChange; // same as above but for m_nEmittingVolume
+#endif
};
VALIDATE_SIZE(tSound, 96);
@@ -229,16 +236,16 @@ public:
uint8 m_nChannelOffset;
float m_fSpeedOfSound;
bool8 m_bTimerJustReset;
- int32 m_nTimer;
+ uint32 m_nTimer;
tSound m_sQueueSample;
- uint8 m_nActiveSampleQueue;
- tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC];
- uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC];
- uint8 m_SampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS];
+ uint8 m_nActiveQueue;
+ tSound m_aRequestedQueue[NUM_SOUND_QUEUES][NUM_CHANNELS_GENERIC];
+ uint8 m_aRequestedOrderList[NUM_SOUND_QUEUES][NUM_CHANNELS_GENERIC];
+ uint8 m_nRequestedCount[NUM_SOUND_QUEUES];
tSound m_asActiveSamples[NUM_CHANNELS_GENERIC];
tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES];
- int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES];
- int32 m_nAudioEntitiesTotal;
+ uint32 m_aAudioEntityOrderList[NUM_AUDIOENTITIES];
+ uint32 m_nAudioEntitiesCount;
#ifdef AUDIO_REFLECTIONS
CVector m_avecReflectionsPos[MAX_REFLECTIONS];
float m_afReflectionsDistances[MAX_REFLECTIONS];
@@ -278,15 +285,15 @@ public:
uint8 m_nMissionAudioLoadingStatus[MISSION_AUDIO_SLOTS];
uint8 m_nMissionAudioPlayStatus[MISSION_AUDIO_SLOTS];
bool8 m_bIsMissionAudioPlaying[MISSION_AUDIO_SLOTS];
- int32 m_nMissionAudioFramesToPlay[MISSION_AUDIO_SLOTS];
+ int32 m_nMissionAudioFramesToPlay[MISSION_AUDIO_SLOTS]; // possibly unsigned
bool8 m_bIsMissionAudioAllowedToPlay[MISSION_AUDIO_SLOTS];
bool8 m_bIsMissionAudioPhoneCall[MISSION_AUDIO_SLOTS];
uint8 m_nGlobalSfxVolumeMultiplier; // used to lower sfx volume during phone calls
int32 m_anRandomTable[5];
uint8 m_nTimeSpent;
- bool8 m_nUserPause;
- bool8 m_nPreviousUserPause;
+ bool8 m_bIsPaused;
+ bool8 m_bWasPaused;
uint32 m_FrameCounter;
uint32 field_5644_lcs;