1 #ifndef CORE_EFFECTSLOT_H
2 #define CORE_EFFECTSLOT_H
8 #include "effects/base.h"
10 #include "intrusive_ptr.h"
15 using EffectSlotArray
= al::FlexArray
<EffectSlot
*>;
18 enum class EffectSlotType
: unsigned char {
36 struct EffectSlotProps
{
44 al::intrusive_ptr
<EffectState
> State
;
46 std::atomic
<EffectSlotProps
*> next
;
53 std::atomic
<EffectSlotProps
*> Update
{nullptr};
55 /* Wet buffer configuration is ACN channel order with N3D scaling.
56 * Consequently, effects that only want to work with mono input can use
57 * channel 0 by itself. Effects that want multichannel can process the
58 * ambisonics signal and make a B-Format source pan.
63 bool AuxSendAuto
{true};
64 EffectSlot
*Target
{nullptr};
66 EffectSlotType EffectType
{EffectSlotType::None
};
67 EffectProps mEffectProps
{};
68 al::intrusive_ptr
<EffectState
> mEffectState
;
70 float RoomRolloff
{0.0f
}; /* Added to the source's room rolloff, not multiplied. */
71 float DecayTime
{0.0f
};
72 float DecayLFRatio
{0.0f
};
73 float DecayHFRatio
{0.0f
};
74 bool DecayHFLimit
{false};
75 float AirAbsorptionGainHF
{1.0f
};
77 /* Mixing buffer used by the Wet mix. */
78 al::vector
<FloatBufferLine
,16> mWetBuffer
;
81 static std::unique_ptr
<EffectSlotArray
> CreatePtrArray(size_t count
);
84 #endif /* CORE_EFFECTSLOT_H */