Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit f97ca8f

Browse files
committed
Renamed NumberOfAudioChannels to MaxAudioChannels
1 parent 4dd5932 commit f97ca8f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Managers/AudioMan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace RTE {
7070
//TODO 44.1 kHz came from data, fmod defaults to 48 kHz, see if we can just use this instead??
7171
m_AudioSystem->setSoftwareFormat(44100, FMOD_SPEAKERMODE_DEFAULT, 0);
7272

73-
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->init(c_NumberOfAudioChannels, FMOD_INIT_NORMAL, 0) : soundSystemSetupResult;
73+
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->init(c_MaxAudioChannels, FMOD_INIT_NORMAL, 0) : soundSystemSetupResult;
7474
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->getMasterChannelGroup(&m_MasterChannelGroup) : soundSystemSetupResult;
7575
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->createChannelGroup("Music", &m_MusicChannelGroup) : soundSystemSetupResult;
7676
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->createChannelGroup("Sounds", &m_SoundChannelGroup) : soundSystemSetupResult;

Managers/AudioMan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ namespace RTE {
5656

5757
struct NetworkSoundData {
5858
unsigned char State;
59-
unsigned short int Channels[c_MaxPlayingSoundsPerContainer]{c_NumberOfAudioChannels + 1};
60-
size_t SoundFileHashes[c_NumberOfAudioChannels]{0};
59+
unsigned short int Channels[c_MaxPlayingSoundsPerContainer]{c_MaxAudioChannels + 1};
60+
size_t SoundFileHashes[c_MaxAudioChannels]{0};
6161
short int Distance;
6262
short int Loops;
6363
float Pitch;

Managers/NetworkClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ namespace RTE
689689
std::unordered_set<SoundContainer *> alreadyHandledSoundContainers;
690690

691691
for (unsigned short serverSoundChannelIndex : sndDataPtr->Channels) {
692-
if (serverSoundChannelIndex < c_NumberOfAudioChannels && m_ServerSounds.find(serverSoundChannelIndex) != m_ServerSounds.end()) {
692+
if (serverSoundChannelIndex < c_MaxAudioChannels && m_ServerSounds.find(serverSoundChannelIndex) != m_ServerSounds.end()) {
693693
SoundContainer *soundContainerToHandle = m_ServerSounds[serverSoundChannelIndex];
694694
if (alreadyHandledSoundContainers.find(soundContainerToHandle) == alreadyHandledSoundContainers.end()) {
695695
switch (sndDataPtr->State) {

System/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace RTE {
3434
#pragma endregion
3535

3636
#pragma region Audio Constants
37-
static constexpr unsigned short int c_NumberOfAudioChannels = 512;
37+
static constexpr unsigned short int c_MaxAudioChannels = 512;
3838
static constexpr unsigned short int c_MaxPlayingSoundsPerContainer = 64;
3939
#pragma endregion
4040

0 commit comments

Comments
 (0)