diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/listener.cpp | 21 | ||||
-rw-r--r-- | al/source.cpp | 15 | ||||
-rw-r--r-- | al/source.h | 1 |
3 files changed, 6 insertions, 31 deletions
diff --git a/al/listener.cpp b/al/listener.cpp index 2a9b77f3..2a9f2cb3 100644 --- a/al/listener.cpp +++ b/al/listener.cpp @@ -48,33 +48,24 @@ inline void UpdateProps(ALCcontext *context) context->mPropsDirty = true; } -#ifdef ALSOFT_EAX inline void CommitAndUpdateProps(ALCcontext *context) { if(!context->mDeferUpdates) { - if(context->has_eax()) +#ifdef ALSOFT_EAX + if(context->eax_needs_commit()) { - context->mHoldUpdates.store(true, std::memory_order_release); - while((context->mUpdateCount.load(std::memory_order_acquire)&1) != 0) { - /* busy-wait */ - } - - context->eax_commit_and_update_sources(); + context->mPropsDirty = true; + context->applyAllUpdates(); + return; } +#endif UpdateContextProps(context); - context->mHoldUpdates.store(false, std::memory_order_release); return; } context->mPropsDirty = true; } -#else - -inline void CommitAndUpdateProps(ALCcontext *context) -{ UpdateProps(context); } -#endif - } // namespace AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value) diff --git a/al/source.cpp b/al/source.cpp index 4993a83c..17a3a0ae 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3958,15 +3958,6 @@ SourceSubList::~SourceSubList() #ifdef ALSOFT_EAX -void EaxUpdateSourceVoice(ALsource *source, ALCcontext *context) -{ - if(Voice *voice{GetSourceVoice(source, context)}) - { - if(std::exchange(source->mPropsDirty, false)) - UpdateSourceProps(source, voice, context); - } -} - constexpr const ALsource::EaxFxSlotIds ALsource::eax4_fx_slot_ids; constexpr const ALsource::EaxFxSlotIds ALsource::eax5_fx_slot_ids; @@ -3988,12 +3979,6 @@ void ALsource::eax_dispatch(const EaxCall& call) call.is_get() ? eax_get(call) : eax_set(call); } -void ALsource::eax_commit_and_update() -{ - eax_commit(); - EaxUpdateSourceVoice(this, eax_al_context_); -} - ALsource* ALsource::eax_lookup_source(ALCcontext& al_context, ALuint source_id) noexcept { return LookupSource(&al_context, source_id); diff --git a/al/source.h b/al/source.h index 78268781..9dffbff7 100644 --- a/al/source.h +++ b/al/source.h @@ -162,7 +162,6 @@ public: void eax_initialize(ALCcontext *context) noexcept; void eax_dispatch(const EaxCall& call); void eax_commit(); - void eax_commit_and_update(); void eax_mark_as_changed() { eax_changed_ = true; } static ALsource* eax_lookup_source(ALCcontext& al_context, ALuint source_id) noexcept; |