aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alu.cpp6
-rw-r--r--alc/effects/dedicated.cpp4
-rw-r--r--alc/effectslot.h24
3 files changed, 27 insertions, 7 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index f3a950f6..ae181af2 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -433,7 +433,7 @@ bool CalcEffectSlotParams(EffectSlot *slot, EffectSlot **sorted_slots, ALCcontex
slot->Target = props->Target;
slot->EffectType = props->Type;
slot->mEffectProps = props->Props;
- if(props->Type == AL_EFFECT_REVERB || props->Type == AL_EFFECT_EAXREVERB)
+ if(props->Type == EffectSlotType::Reverb || props->Type == EffectSlotType::EAXReverb)
{
slot->RoomRolloff = props->Props.Reverb.RoomRolloffFactor;
slot->DecayTime = props->Props.Reverb.DecayTime;
@@ -1205,7 +1205,7 @@ void CalcNonAttnSourceParams(Voice *voice, const VoiceProps *props, const ALCcon
for(uint i{0};i < Device->NumAuxSends;i++)
{
SendSlots[i] = props->Send[i].Slot;
- if(!SendSlots[i] || SendSlots[i]->EffectType == AL_EFFECT_NULL)
+ if(!SendSlots[i] || SendSlots[i]->EffectType == EffectSlotType::None)
{
SendSlots[i] = nullptr;
voice->mSend[i].Buffer = {};
@@ -1255,7 +1255,7 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ALCcontex
for(uint i{0};i < NumSends;i++)
{
SendSlots[i] = props->Send[i].Slot;
- if(!SendSlots[i] || SendSlots[i]->EffectType == AL_EFFECT_NULL)
+ if(!SendSlots[i] || SendSlots[i]->EffectType == EffectSlotType::None)
{
SendSlots[i] = nullptr;
RoomRolloff[i] = 0.0f;
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index 816b6021..e71f75f0 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -58,7 +58,7 @@ void DedicatedState::update(const ALCcontext*, const EffectSlot *slot,
const float Gain{slot->Gain * props->Dedicated.Gain};
- if(slot->EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ if(slot->EffectType == EffectSlotType::DedicatedLFE)
{
const uint idx{!target.RealOut ? INVALID_CHANNEL_INDEX :
GetChannelIdxByName(*target.RealOut, LFE)};
@@ -68,7 +68,7 @@ void DedicatedState::update(const ALCcontext*, const EffectSlot *slot,
mTargetGains[idx] = Gain;
}
}
- else if(slot->EffectType == AL_EFFECT_DEDICATED_DIALOGUE)
+ else if(slot->EffectType == EffectSlotType::DedicatedDialog)
{
/* Dialog goes to the front-center speaker if it exists, otherwise it
* plays from the front-center location. */
diff --git a/alc/effectslot.h b/alc/effectslot.h
index 2bef5477..be84fcab 100644
--- a/alc/effectslot.h
+++ b/alc/effectslot.h
@@ -14,12 +14,32 @@ struct EffectSlot;
using EffectSlotArray = al::FlexArray<EffectSlot*>;
+enum class EffectSlotType : unsigned char {
+ None,
+ Reverb,
+ Chorus,
+ Distortion,
+ Echo,
+ Flanger,
+ FrequencyShifter,
+ VocalMorpher,
+ PitchShifter,
+ RingModulator,
+ Autowah,
+ Compressor,
+ Equalizer,
+ EAXReverb,
+ DedicatedLFE,
+ DedicatedDialog,
+ Convolution
+};
+
struct EffectSlotProps {
float Gain;
bool AuxSendAuto;
EffectSlot *Target;
- ALenum Type;
+ EffectSlotType Type;
EffectProps Props;
al::intrusive_ptr<EffectState> State;
@@ -44,7 +64,7 @@ struct EffectSlot {
bool AuxSendAuto{true};
EffectSlot *Target{nullptr};
- ALenum EffectType{};
+ EffectSlotType EffectType{EffectSlotType::None};
EffectProps mEffectProps{};
EffectState *mEffectState{nullptr};