diff options
Diffstat (limited to 'core/hrtf.cpp')
-rw-r--r-- | core/hrtf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/hrtf.cpp b/core/hrtf.cpp index 9a13a004..1b7da3f9 100644 --- a/core/hrtf.cpp +++ b/core/hrtf.cpp @@ -392,7 +392,7 @@ std::unique_ptr<HrtfStore> CreateHrtfStore(uint rate, uint8_t irSize, if(void *ptr{al_calloc(16, total)}) { Hrtf.reset(al::construct_at(static_cast<HrtfStore*>(ptr))); - InitRef(Hrtf->mRef, 1u); + Hrtf->mRef.store(1u, std::memory_order_relaxed); Hrtf->mSampleRate = rate & 0xff'ff'ff; Hrtf->mIrSize = irSize; @@ -1459,9 +1459,9 @@ void HrtfStore::dec_ref() auto remove_unused = [](LoadedHrtf &hrtf) -> bool { HrtfStore *entry{hrtf.mEntry.get()}; - if(entry && ReadRef(entry->mRef) == 0) + if(entry && entry->mRef.load() == 0) { - TRACE("Unloading unused HRTF %s\n", hrtf.mFilename.data()); + TRACE("Unloading unused HRTF %s\n", hrtf.mFilename.c_str()); hrtf.mEntry = nullptr; return true; } |