1 #ifndef CORE_EFFECTSLOT_H
2 #define CORE_EFFECTSLOT_H
8 #include "effects/base.h"
9 #include "intrusive_ptr.h"
14 using EffectSlotArray
= al::FlexArray
<EffectSlot
*>;
17 enum class EffectSlotType
: unsigned char {
37 struct EffectSlotProps
{
45 al::intrusive_ptr
<EffectState
> State
;
47 std::atomic
<EffectSlotProps
*> next
;
49 DEF_NEWDEL(EffectSlotProps
)
54 std::atomic
<EffectSlotProps
*> Update
{nullptr};
56 /* Wet buffer configuration is ACN channel order with N3D scaling.
57 * Consequently, effects that only want to work with mono input can use
58 * channel 0 by itself. Effects that want multichannel can process the
59 * ambisonics signal and make a B-Format source pan.
64 bool AuxSendAuto
{true};
65 EffectSlot
*Target
{nullptr};
67 EffectSlotType EffectType
{EffectSlotType::None
};
68 EffectProps mEffectProps
{};
69 EffectState
*mEffectState
{nullptr};
71 float RoomRolloff
{0.0f
}; /* Added to the source's room rolloff, not multiplied. */
72 float DecayTime
{0.0f
};
73 float DecayLFRatio
{0.0f
};
74 float DecayHFRatio
{0.0f
};
75 bool DecayHFLimit
{false};
76 float AirAbsorptionGainHF
{1.0f
};
78 /* Mixing buffer used by the Wet mix. */
79 WetBuffer
*mWetBuffer
{nullptr};
83 static EffectSlotArray
*CreatePtrArray(size_t count
) noexcept
;
88 #endif /* CORE_EFFECTSLOT_H */