aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-21 05:06:31 -0800
committerChris Robinson <[email protected]>2018-11-21 05:06:31 -0800
commit757c42c74bb1f88dfc6f24200382a0ea741fccac (patch)
tree0907ea85e05f27a19e83794046bc85d474013d7d /Alc/panning.cpp
parent4c64fa1e4e11f39f7b6634e24dee13bb7434927c (diff)
Use a normal vector for the distance buffer storage
Diffstat (limited to 'Alc/panning.cpp')
-rw-r--r--Alc/panning.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index 806486a3..f538e347 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -445,8 +445,8 @@ static void InitDistanceComp(ALCdevice *device, const AmbDecConf *conf, const AL
if(total > 0)
{
- device->ChannelDelay[0].Buffer = reinterpret_cast<float*>(
- al_calloc(16, total * sizeof(ALfloat)));
+ device->ChannelDelay.resize(total);
+ device->ChannelDelay[0].Buffer = device->ChannelDelay.data();
for(i = 1;i < MAX_OUTPUT_CHANNELS;i++)
{
size_t len = RoundUp(device->ChannelDelay[i-1].Length, 4);
@@ -943,12 +943,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf
device->NumChannelsPerOrder[i] = 0;
device->AvgSpeakerDist = 0.0f;
- memset(device->ChannelDelay, 0, sizeof(device->ChannelDelay));
- for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
- {
- device->ChannelDelay[i].Gain = 1.0f;
- device->ChannelDelay[i].Length = 0;
- }
+ device->ChannelDelay.clear();
al_free(device->Stablizer);
device->Stablizer = NULL;