File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Core/GameEngine/Source/Common/Audio Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 7272
7373// /////////////////////////////////////////////////////////////////////////////////////////////////
7474
75+ static const AsciiString s_noSoundString (" NoSound" );
76+
7577static const char * TheSpeakerTypes[] =
7678{
7779 " 2 Speakers" ,
@@ -407,7 +409,7 @@ void AudioManager::getInfoForAudioEvent( const AudioEventRTS *eventToFindAndFill
407409// -------------------------------------------------------------------------------------------------
408410AudioHandle AudioManager::addAudioEvent (const AudioEventRTS *eventToAdd)
409411{
410- if (eventToAdd->getEventName ().isEmpty () || eventToAdd->getEventName () == AsciiString ( " NoSound " ) ) {
412+ if (eventToAdd->getEventName ().isEmpty () || eventToAdd->getEventName () == s_noSoundString ) {
411413 return AHSV_NoSound;
412414 }
413415
@@ -443,6 +445,11 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
443445 return AHSV_NoSound;
444446 }
445447
448+ if (!eventToAdd->getUninterruptable ()) {
449+ if (!shouldPlayLocally (eventToAdd)) {
450+ return AHSV_NotForLocal;
451+ }
452+ }
446453
447454 AudioEventRTS *audioEvent = MSGNEW (" AudioEventRTS" ) AudioEventRTS (*eventToAdd); // poolify
448455 audioEvent->setPlayingHandle ( allocateNewHandle () );
@@ -458,13 +465,6 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
458465 }
459466 }
460467
461- if (!audioEvent->getUninterruptable ()) {
462- if (!shouldPlayLocally (audioEvent)) {
463- releaseAudioEventRTS (audioEvent);
464- return AHSV_NotForLocal;
465- }
466- }
467-
468468 // cull muted audio
469469 if (audioEvent->getVolume () < m_audioSettings->m_minVolume ) {
470470#ifdef INTENSIVE_AUDIO_DEBUG
You can’t perform that action at this time.
0 commit comments