aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-03-11 12:16:32 -0800
committerChris Robinson <[email protected]>2023-03-11 12:16:32 -0800
commit1e226fd54dc6670222ce1210cf55fe1b4d61e89c (patch)
treeb72c4cc990cdabcd0b4b475c57f809a1405bc329 /alc/context.cpp
parent64ead7d36de7dc748414530121b69876a0c84e05 (diff)
Don't commit EAX updates in applyAllUpdates
To avoid alcProcessContext causing deferred EAX properties to be committed. This simplifies updates when EAX has been initialized, but never or rarely used. Committing now always occurs in EAXSet when the property is non-deferred, updating the OpenAL object(s) with it (with OpenAL's updates then being applied based on the context's defer state).
Diffstat (limited to 'alc/context.cpp')
-rw-r--r--alc/context.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index cff666e8..16acb0e8 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -264,10 +264,6 @@ void ALCcontext::applyAllUpdates()
/* busy-wait */
}
-#ifdef ALSOFT_EAX
- if(eax_is_initialized_)
- eax_commit();
-#endif
if(std::exchange(mPropsDirty, false))
UpdateContextProps(this);
UpdateAllEffectSlotProps(this);
@@ -353,8 +349,12 @@ ALenum ALCcontext::eax_eax_set(
eax_fail_unknown_property_set_id();
}
- if(!call.is_deferred() && !mDeferUpdates)
- applyAllUpdates();
+ if(!call.is_deferred())
+ {
+ eax_commit();
+ if(!mDeferUpdates)
+ applyAllUpdates();
+ }
return AL_NO_ERROR;
}
@@ -1002,8 +1002,6 @@ void ALCcontext::eax_context_commit()
case 5:
eax5_context_commit(eax5_, dst_df);
break;
- default:
- eax_fail_unknown_version();
}
if(dst_df == EaxDirtyFlags{})
@@ -1031,6 +1029,8 @@ void ALCcontext::eax_context_commit()
void ALCcontext::eax_commit()
{
eax_context_commit();
+ eax_commit_fx_slots();
+ eax_update_sources();
}
namespace {