aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.cpp9
-rw-r--r--alc/backends/jack.cpp4
2 files changed, 6 insertions, 7 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 59b5a551..b50eaa41 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1912,7 +1912,7 @@ void ProcessVoiceChanges(ContextBase *ctx)
ctx->mCurrentVoiceChange.store(cur, std::memory_order_release);
}
-void ProcessParamUpdates(ContextBase *ctx, const EffectSlotArray &slots,
+void ProcessParamUpdates(ContextBase *ctx, const al::span<EffectSlot*> slots,
const al::span<Voice*> voices)
{
ProcessVoiceChanges(ctx);
@@ -1921,7 +1921,7 @@ void ProcessParamUpdates(ContextBase *ctx, const EffectSlotArray &slots,
if(!ctx->mHoldUpdates.load(std::memory_order_acquire)) LIKELY
{
bool force{CalcContextParams(ctx)};
- auto sorted_slots = const_cast<EffectSlot**>(slots.data() + slots.size());
+ auto sorted_slots = al::to_address(slots.end());
for(EffectSlot *slot : slots)
force |= CalcEffectSlotParams(slot, sorted_slots, ctx);
@@ -1945,7 +1945,7 @@ void ProcessContexts(DeviceBase *device, const uint SamplesToDo)
for(ContextBase *ctx : *device->mContexts.load(std::memory_order_acquire))
{
- const EffectSlotArray &auxslots = *ctx->mActiveAuxSlots.load(std::memory_order_acquire);
+ auto auxslots = al::span{*ctx->mActiveAuxSlots.load(std::memory_order_acquire)};
const al::span<Voice*> voices{ctx->getVoicesSpanAcquired()};
/* Process pending property updates for objects on the context. */
@@ -1972,8 +1972,7 @@ void ProcessContexts(DeviceBase *device, const uint SamplesToDo)
/* Sort the slots into extra storage, so that effect slots come
* before their effect slot target (or their targets' target).
*/
- const al::span sorted_slots{const_cast<EffectSlot**>(al::to_address(auxslots.end())),
- auxslots.size()};
+ const al::span sorted_slots{al::to_address(auxslots.end()), auxslots.size()};
/* Skip sorting if it has already been done. */
if(!sorted_slots[0])
{
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index 1e5c17ad..529bb9fe 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -371,7 +371,7 @@ int JackPlayback::process(jack_nframes_t numframes) noexcept
jack_nframes_t todo{minu(numframes, static_cast<uint>(data.first.len))};
auto write_first = [&data,numchans,todo](float *outbuf) -> float*
{
- const float *RESTRICT in = reinterpret_cast<float*>(data.first.buf);
+ const auto *RESTRICT in = reinterpret_cast<const float*>(data.first.buf);
auto deinterlace_input = [&in,numchans]() noexcept -> float
{
float ret{*in};
@@ -390,7 +390,7 @@ int JackPlayback::process(jack_nframes_t numframes) noexcept
{
auto write_second = [&data,numchans,todo](float *outbuf) -> float*
{
- const float *RESTRICT in = reinterpret_cast<float*>(data.second.buf);
+ const auto *RESTRICT in = reinterpret_cast<const float*>(data.second.buf);
auto deinterlace_input = [&in,numchans]() noexcept -> float
{
float ret{*in};