aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 75f809de..40bef38d 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2098,6 +2098,12 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
EffectState *state{slot->Effect.State.get()};
state->mOutTarget = device->Dry.Buffer;
state->deviceUpdate(device);
+ if(ALbuffer *buffer{slot->Buffer})
+ {
+ slot->Effect.Buffer = nullptr;
+ slot->Effect.Buffer.reset(state->createBuffer(device, buffer->mData.data(),
+ buffer->Frequency, buffer->mFmtType, buffer->mFmtChannels, buffer->SampleLen));
+ }
slot->updateProps(context);
}
@@ -2119,6 +2125,13 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
EffectState *state{slot->Effect.State.get()};
state->mOutTarget = device->Dry.Buffer;
state->deviceUpdate(device);
+ if(ALbuffer *buffer{slot->Buffer})
+ {
+ slot->Effect.Buffer = nullptr;
+ slot->Effect.Buffer.reset(state->createBuffer(device, buffer->mData.data(),
+ buffer->Frequency, buffer->mFmtType, buffer->mFmtChannels,
+ buffer->SampleLen));
+ }
slot->updateProps(context);
}
}