aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp10
-rw-r--r--Alc/alcontext.h2
2 files changed, 4 insertions, 8 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index ca13e911..cea1fb61 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2325,15 +2325,11 @@ static ALvoid InitContext(ALCcontext *Context)
//Validate Context
if(!Context->DefaultSlot)
- auxslots = new ALeffectslotArray{};
+ auxslots = ALeffectslot::CreatePtrArray(0);
else
{
- /* Allocate twice as much space for effect slots so the mixer has a
- * place to sort them.
- */
- auxslots = new ALeffectslotArray{};
- auxslots->reserve(2);
- auxslots->push_back(Context->DefaultSlot.get());
+ auxslots = ALeffectslot::CreatePtrArray(1);
+ (*auxslots)[0] = Context->DefaultSlot.get();
}
Context->ActiveAuxSlots.store(auxslots, std::memory_order_relaxed);
diff --git a/Alc/alcontext.h b/Alc/alcontext.h
index dc9ada55..472d06ae 100644
--- a/Alc/alcontext.h
+++ b/Alc/alcontext.h
@@ -107,7 +107,7 @@ struct ALCcontext {
std::atomic<ALsizei> VoiceCount{0};
ALsizei MaxVoices{0};
- using ALeffectslotArray = al::vector<ALeffectslot*>;
+ using ALeffectslotArray = al::FlexArray<ALeffectslot*>;
std::atomic<ALeffectslotArray*> ActiveAuxSlots{nullptr};
std::thread EventThread;