aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 9eface89..856deb79 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2300,55 +2300,6 @@ static bool ResetDeviceParams(ALCdevice *device, const int *attrList)
}
-DeviceBase::DeviceBase(DeviceType type) : Type{type}, mContexts{&sEmptyContextArray}
-{
-}
-
-DeviceBase::~DeviceBase()
-{
- auto *oldarray = mContexts.exchange(nullptr, std::memory_order_relaxed);
- if(oldarray != &sEmptyContextArray) delete oldarray;
-}
-
-ALCdevice::~ALCdevice()
-{
- TRACE("Freeing device %p\n", voidp{this});
-
- Backend = nullptr;
-
- size_t count{std::accumulate(BufferList.cbegin(), BufferList.cend(), size_t{0u},
- [](size_t cur, const BufferSubList &sublist) noexcept -> size_t
- { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); })};
- if(count > 0)
- WARN("%zu Buffer%s not deleted\n", count, (count==1)?"":"s");
-
- count = std::accumulate(EffectList.cbegin(), EffectList.cend(), size_t{0u},
- [](size_t cur, const EffectSubList &sublist) noexcept -> size_t
- { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); });
- if(count > 0)
- WARN("%zu Effect%s not deleted\n", count, (count==1)?"":"s");
-
- count = std::accumulate(FilterList.cbegin(), FilterList.cend(), size_t{0u},
- [](size_t cur, const FilterSubList &sublist) noexcept -> size_t
- { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); });
- if(count > 0)
- WARN("%zu Filter%s not deleted\n", count, (count==1)?"":"s");
-}
-
-void ALCdevice::enumerateHrtfs()
-{
- mHrtfList = EnumerateHrtf(ConfigValueStr(DeviceName.c_str(), nullptr, "hrtf-paths"));
- if(auto defhrtfopt = ConfigValueStr(DeviceName.c_str(), nullptr, "default-hrtf"))
- {
- auto iter = std::find(mHrtfList.begin(), mHrtfList.end(), *defhrtfopt);
- if(iter == mHrtfList.end())
- WARN("Failed to find default HRTF \"%s\"\n", defhrtfopt->c_str());
- else if(iter != mHrtfList.begin())
- std::rotate(mHrtfList.begin(), iter, iter+1);
- }
-}
-
-
/** Checks if the device handle is valid, and returns a new reference if so. */
static DeviceRef VerifyDevice(ALCdevice *device)
{