Use a separate function to remove a source from fading sources
[alure.git] / src / auxeffectslot.h
bloba17dab6c47131bd5d66278997bf432db944b810e
1 #ifndef AUXEFFECTSLOT_H
2 #define AUXEFFECTSLOT_H
4 #include "main.h"
6 #include <algorithm>
8 namespace alure {
10 class AuxiliaryEffectSlotImpl {
11 ContextImpl *const mContext;
12 ALuint mId;
14 Vector<SourceSend> mSourceSends;
16 public:
17 AuxiliaryEffectSlotImpl(ContextImpl *context, ALuint id)
18 : mContext(context), mId(id)
19 { }
21 void addSourceSend(SourceSend source_send);
22 void removeSourceSend(SourceSend source_send);
24 ContextImpl *getContext() { return mContext; }
25 const ALuint &getId() const { return mId; }
27 void setGain(ALfloat gain);
28 void setSendAuto(bool sendauto);
30 void applyEffect(Effect effect);
32 void release();
34 Vector<SourceSend> getSourceSends() const { return mSourceSends; }
36 bool isInUse() const { return (mSourceSends.size() > 0); }
39 } // namespace alure
41 #endif /* AUXEFFECTSLOT_H */