Skip to content

Commit 45a76aa

Browse files
committed
perf(audio): remove RETAIL_COMPATIBLE_CRC guard from addAudioEvent optimization
1 parent cb45e62 commit 45a76aa

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

Core/GameEngine/Source/Common/Audio/GameAudio.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@
7272

7373
///////////////////////////////////////////////////////////////////////////////////////////////////
7474

75-
#if !RETAIL_COMPATIBLE_CRC
7675
static const AsciiString s_noSoundString("NoSound");
77-
#endif
7876

7977
static const char* TheSpeakerTypes[] =
8078
{
@@ -411,11 +409,7 @@ void AudioManager::getInfoForAudioEvent( const AudioEventRTS *eventToFindAndFill
411409
//-------------------------------------------------------------------------------------------------
412410
AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
413411
{
414-
#if RETAIL_COMPATIBLE_CRC
415-
if (eventToAdd->getEventName().isEmpty() || eventToAdd->getEventName() == AsciiString("NoSound")) {
416-
#else
417412
if (eventToAdd->getEventName().isEmpty() || eventToAdd->getEventName() == s_noSoundString) {
418-
#endif
419413
return AHSV_NoSound;
420414
}
421415

@@ -451,13 +445,11 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
451445
return AHSV_NoSound;
452446
}
453447

454-
#if !RETAIL_COMPATIBLE_CRC
455448
if (!eventToAdd->getUninterruptable()) {
456449
if (!shouldPlayLocally(eventToAdd)) {
457450
return AHSV_NotForLocal;
458451
}
459452
}
460-
#endif
461453

462454
AudioEventRTS *audioEvent = MSGNEW("AudioEventRTS") AudioEventRTS(*eventToAdd); // poolify
463455
audioEvent->setPlayingHandle( allocateNewHandle() );
@@ -473,15 +465,6 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
473465
}
474466
}
475467

476-
#if RETAIL_COMPATIBLE_CRC
477-
if (!audioEvent->getUninterruptable()) {
478-
if (!shouldPlayLocally(audioEvent)) {
479-
releaseAudioEventRTS(audioEvent);
480-
return AHSV_NotForLocal;
481-
}
482-
}
483-
#endif
484-
485468
// cull muted audio
486469
if (audioEvent->getVolume() < m_audioSettings->m_minVolume) {
487470
#ifdef INTENSIVE_AUDIO_DEBUG

0 commit comments

Comments
 (0)