Remove unnecessary forward declarations
[alure.git] / src / auxeffectslot.h
blobc807b585d21f40878f7f2ccf51157eb7da56ed3a
1 #ifndef AUXEFFECTSLOT_H
2 #define AUXEFFECTSLOT_H
4 #include "main.h"
6 #include <algorithm>
8 namespace alure {
10 inline bool operator==(const SourceSend &lhs, const SourceSend &rhs)
11 { return lhs.mSource == rhs.mSource && lhs.mSend == rhs.mSend; }
13 class AuxiliaryEffectSlotImpl {
14 ContextImpl *const mContext;
15 ALuint mId;
17 Vector<SourceSend> mSourceSends;
19 public:
20 AuxiliaryEffectSlotImpl(ContextImpl *context, ALuint id)
21 : mContext(context), mId(id)
22 { }
24 void addSourceSend(Source source, ALuint send)
25 { mSourceSends.emplace_back((SourceSend){source, send}); }
26 void removeSourceSend(Source source, ALuint send)
28 auto iter = std::find(mSourceSends.cbegin(), mSourceSends.cend(), SourceSend{source, send});
29 if(iter != mSourceSends.cend()) mSourceSends.erase(iter);
32 ContextImpl *getContext() { return mContext; }
33 const ALuint &getId() const { return mId; }
35 void setGain(ALfloat gain);
36 void setSendAuto(bool sendauto);
38 void applyEffect(Effect effect);
40 void release();
42 Vector<SourceSend> getSourceSends() const { return mSourceSends; }
44 bool isInUse() const { return (mSourceSends.size() > 0); }
47 } // namespace alure
49 #endif /* AUXEFFECTSLOT_H */