aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-12-17 17:34:03 -0800
committerChris Robinson <[email protected]>2021-12-17 17:34:03 -0800
commitcbbc4dc8faf14f234d156ccc312b952ed9bc4e8e (patch)
tree739a2c3156bffbd25eab89809723df0a5de0d89d /alc/context.cpp
parentd16b61dffb24cbe90e03e921684cb538cb23e181 (diff)
Move some more context functions to the proper source
Diffstat (limited to 'alc/context.cpp')
-rw-r--r--alc/context.cpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index b870a2a3..1dff00bc 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -96,82 +96,6 @@ thread_local ALCcontext::ThreadCtx ALCcontext::sThreadContext;
ALeffect ALCcontext::sDefaultEffect;
-ContextBase::ContextBase(DeviceBase *device) : mDevice{device}
-{ }
-
-ContextBase::~ContextBase()
-{
- size_t count{0};
- ContextProps *cprops{mParams.ContextUpdate.exchange(nullptr, std::memory_order_relaxed)};
- if(cprops)
- {
- ++count;
- delete cprops;
- }
- cprops = mFreeContextProps.exchange(nullptr, std::memory_order_acquire);
- while(cprops)
- {
- std::unique_ptr<ContextProps> old{cprops};
- cprops = old->next.load(std::memory_order_relaxed);
- ++count;
- }
- TRACE("Freed %zu context property object%s\n", count, (count==1)?"":"s");
-
- count = 0;
- EffectSlotProps *eprops{mFreeEffectslotProps.exchange(nullptr, std::memory_order_acquire)};
- while(eprops)
- {
- std::unique_ptr<EffectSlotProps> old{eprops};
- eprops = old->next.load(std::memory_order_relaxed);
- ++count;
- }
- TRACE("Freed %zu AuxiliaryEffectSlot property object%s\n", count, (count==1)?"":"s");
-
- if(EffectSlotArray *curarray{mActiveAuxSlots.exchange(nullptr, std::memory_order_relaxed)})
- {
- al::destroy_n(curarray->end(), curarray->size());
- delete curarray;
- }
-
- delete mVoices.exchange(nullptr, std::memory_order_relaxed);
-
- count = 0;
- ListenerProps *lprops{mParams.ListenerUpdate.exchange(nullptr, std::memory_order_relaxed)};
- if(lprops)
- {
- ++count;
- delete lprops;
- }
- lprops = mFreeListenerProps.exchange(nullptr, std::memory_order_acquire);
- while(lprops)
- {
- std::unique_ptr<ListenerProps> old{lprops};
- lprops = old->next.load(std::memory_order_relaxed);
- ++count;
- }
- TRACE("Freed %zu listener property object%s\n", count, (count==1)?"":"s");
-
- if(mAsyncEvents)
- {
- count = 0;
- auto evt_vec = mAsyncEvents->getReadVector();
- if(evt_vec.first.len > 0)
- {
- al::destroy_n(reinterpret_cast<AsyncEvent*>(evt_vec.first.buf), evt_vec.first.len);
- count += evt_vec.first.len;
- }
- if(evt_vec.second.len > 0)
- {
- al::destroy_n(reinterpret_cast<AsyncEvent*>(evt_vec.second.buf), evt_vec.second.len);
- count += evt_vec.second.len;
- }
- if(count > 0)
- TRACE("Destructed %zu orphaned event%s\n", count, (count==1)?"":"s");
- mAsyncEvents->readAdvance(count);
- }
-}
-
-
ALCcontext::ALCcontext(al::intrusive_ptr<ALCdevice> device)
: ContextBase{device.get()}, mALDevice{std::move(device)}
{