CAudioManager: Make LogSoundInfo() a const member function

This function doesn't modify internal state.
This commit is contained in:
Lioncash 2020-06-11 13:37:53 -04:00
parent 872c38b384
commit 9ec61de2ca
2 changed files with 12 additions and 12 deletions

View File

@ -84,18 +84,18 @@ SSoundInfo CAudioManager::GetSoundInfo(uint32 SoundID) const
return Out; return Out;
} }
void CAudioManager::LogSoundInfo(uint32 SoundID) void CAudioManager::LogSoundInfo(uint32 SoundID) const
{ {
SSoundInfo SoundInfo = GetSoundInfo(SoundID); const SSoundInfo SoundInfo = GetSoundInfo(SoundID);
if (SoundInfo.DefineID != 0xFFFF) if (SoundInfo.DefineID == 0xFFFF)
{ return;
if (mpProject->Game() >= EGame::EchoesDemo)
debugf("Sound Name: %s", *SoundInfo.Name);
debugf("Sound ID: 0x%04x", SoundInfo.SoundID); if (mpProject->Game() >= EGame::EchoesDemo)
debugf("Define ID: 0x%04x", SoundInfo.DefineID); debugf("Sound Name: %s", *SoundInfo.Name);
debugf("Audio Group: %s", *SoundInfo.pAudioGroup->Entry()->Name());
debugf(""); debugf("Sound ID: 0x%04x", SoundInfo.SoundID);
} debugf("Define ID: 0x%04x", SoundInfo.DefineID);
debugf("Audio Group: %s", *SoundInfo.pAudioGroup->Entry()->Name());
debugf("");
} }

View File

@ -30,7 +30,7 @@ public:
void LoadAssets(); void LoadAssets();
void ClearAssets(); void ClearAssets();
SSoundInfo GetSoundInfo(uint32 SoundID) const; SSoundInfo GetSoundInfo(uint32 SoundID) const;
void LogSoundInfo(uint32 SoundID); void LogSoundInfo(uint32 SoundID) const;
}; };
#endif // CAUDIOMANAGER #endif // CAUDIOMANAGER