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)
56 std::atomic<EffectSlotProps*> Update{nullptr};
58 /* Wet buffer configuration is ACN channel order with N3D scaling.
59 * Consequently, effects that only want to work with mono input can use
60 * channel 0 by itself. Effects that want multichannel can process the
61 * ambisonics signal and make a B-Format source pan.
66 bool AuxSendAuto{true};
67 EffectSlot *Target{nullptr};
69 EffectSlotType EffectType{EffectSlotType::None};
70 EffectProps mEffectProps{};
71 al::intrusive_ptr<EffectState> mEffectState;
73 float RoomRolloff{0.0f}; /* Added to the source's room rolloff, not multiplied. */
74 float DecayTime{0.0f};
75 float DecayLFRatio{0.0f};
76 float DecayHFRatio{0.0f};
77 bool DecayHFLimit{false};
78 float AirAbsorptionGainHF{1.0f};
80 /* Mixing buffer used by the Wet mix. */
81 al::vector<FloatBufferLine,16> mWetBuffer;
84 static EffectSlotArray *CreatePtrArray(size_t count) noexcept;
86 DEF_NEWDEL(EffectSlot)
89 #endif /* CORE_EFFECTSLOT_H */