1 #ifndef AUXEFFECTSLOT_H
2 #define AUXEFFECTSLOT_H
16 inline bool operator==(const SourceSend
&lhs
, const SourceSend
&rhs
)
17 { return lhs
.mSource
== rhs
.mSource
&& lhs
.mSend
== rhs
.mSend
; }
19 class AuxiliaryEffectSlotImpl
{
20 ContextImpl
*const mContext
;
23 Vector
<SourceSend
> mSourceSends
;
26 AuxiliaryEffectSlotImpl(ContextImpl
*context
, ALuint id
)
27 : mContext(context
), mId(id
)
30 void addSourceSend(Source source
, ALuint send
)
31 { mSourceSends
.emplace_back((SourceSend
){source
, send
}); }
32 void removeSourceSend(Source source
, ALuint send
)
34 auto iter
= std::find(mSourceSends
.cbegin(), mSourceSends
.cend(), SourceSend
{source
, send
});
35 if(iter
!= mSourceSends
.cend()) mSourceSends
.erase(iter
);
38 ContextImpl
*getContext() { return mContext
; }
39 const ALuint
&getId() const { return mId
; }
41 void setGain(ALfloat gain
);
42 void setSendAuto(bool sendauto
);
44 void applyEffect(Effect effect
);
48 Vector
<SourceSend
> getSourceSends() const { return mSourceSends
; }
50 bool isInUse() const { return (mSourceSends
.size() > 0); }
55 #endif /* AUXEFFECTSLOT_H */