Skip to content

Commit c406045

Browse files
committed
Moved the shouldPlayLocally() check to after the volume adjustments loop
1 parent 47b5369 commit c406045

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,6 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
451451
((AudioEventRTS*)eventToAdd)->setPlayingAudioIndex( audioEvent->getPlayingAudioIndex() );
452452
audioEvent->generatePlayInfo(); // generate pitch shift and volume shift now as well
453453

454-
if (!audioEvent->getUninterruptable()) {
455-
if (!shouldPlayLocally(audioEvent)) {
456-
releaseAudioEventRTS(audioEvent);
457-
return AHSV_NotForLocal;
458-
}
459-
}
460-
461454
std::list<std::pair<AsciiString, Real> >::iterator it;
462455
for (it = m_adjustedVolumes.begin(); it != m_adjustedVolumes.end(); ++it) {
463456
if (it->first == audioEvent->getEventName()) {
@@ -466,6 +459,13 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
466459
}
467460
}
468461

462+
if (!audioEvent->getUninterruptable()) {
463+
if (!shouldPlayLocally(audioEvent)) {
464+
releaseAudioEventRTS(audioEvent);
465+
return AHSV_NotForLocal;
466+
}
467+
}
468+
469469
// cull muted audio
470470
if (audioEvent->getVolume() < m_audioSettings->m_minVolume) {
471471
#ifdef INTENSIVE_AUDIO_DEBUG

0 commit comments

Comments
 (0)