aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 64a7afc1..d089f24c 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -149,8 +149,8 @@ void UpdateSourceProps(const ALsource *source, Voice *voice, ALCcontext *context
auto copy_send = [](const ALsource::SendData &srcsend) noexcept -> VoiceProps::SendData
{
- VoiceProps::SendData ret;
- ret.Slot = srcsend.Slot;
+ VoiceProps::SendData ret{};
+ ret.Slot = srcsend.Slot ? &srcsend.Slot->mSlot : nullptr;
ret.Gain = srcsend.Gain;
ret.GainHF = srcsend.GainHF;
ret.HFReference = srcsend.HFReference;
@@ -159,6 +159,8 @@ void UpdateSourceProps(const ALsource *source, Voice *voice, ALCcontext *context
return ret;
};
std::transform(source->Send.cbegin(), source->Send.cend(), props->Send, copy_send);
+ if(!props->Send[0].Slot && context->mDefaultSlot)
+ props->Send[0].Slot = &context->mDefaultSlot->mSlot;
/* Set the new container for updating internal parameters. */
props = voice->mUpdate.exchange(props, std::memory_order_acq_rel);