1 #ifndef AUXEFFECTSLOT_H
2 #define AUXEFFECTSLOT_H
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
;
17 Vector
<SourceSend
> mSourceSends
;
20 AuxiliaryEffectSlotImpl(ContextImpl
*context
, ALuint id
)
21 : mContext(context
), mId(id
)
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
);
42 Vector
<SourceSend
> getSourceSends() const { return mSourceSends
; }
44 bool isInUse() const { return (mSourceSends
.size() > 0); }
49 #endif /* AUXEFFECTSLOT_H */