diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/auxeffectslot.cpp | 4 | ||||
-rw-r--r-- | al/auxeffectslot.h | 14 | ||||
-rw-r--r-- | al/effect.cpp | 6 | ||||
-rw-r--r-- | al/effect.h | 4 | ||||
-rw-r--r-- | al/listener.h | 2 | ||||
-rw-r--r-- | al/state.cpp | 6 |
6 files changed, 18 insertions, 18 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 6a7bbb46..ac9bcd71 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -394,7 +394,7 @@ START_API_FUNC if(!(value == AL_TRUE || value == AL_FALSE)) SETERR_RETURN(context, AL_INVALID_VALUE,, "Effect slot auxiliary send auto out of range"); - slot->AuxSendAuto = static_cast<ALboolean>(value); + slot->AuxSendAuto = !!value; break; case AL_EFFECTSLOT_TARGET_SOFT: @@ -535,7 +535,7 @@ START_API_FUNC switch(param) { case AL_EFFECTSLOT_AUXILIARY_SEND_AUTO: - *value = slot->AuxSendAuto; + *value = slot->AuxSendAuto ? AL_TRUE : AL_FALSE; break; case AL_EFFECTSLOT_TARGET_SOFT: diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h index 327cb357..ae41a32a 100644 --- a/al/auxeffectslot.h +++ b/al/auxeffectslot.h @@ -22,8 +22,8 @@ using ALeffectslotArray = al::FlexArray<ALeffectslot*>; struct ALeffectslotProps { - ALfloat Gain; - ALboolean AuxSendAuto; + float Gain; + bool AuxSendAuto; ALeffectslot *Target; ALenum Type; @@ -38,8 +38,8 @@ struct ALeffectslotProps { struct ALeffectslot { - ALfloat Gain{1.0f}; - ALboolean AuxSendAuto{AL_TRUE}; + float Gain{1.0f}; + bool AuxSendAuto{true}; ALeffectslot *Target{nullptr}; struct { @@ -56,8 +56,8 @@ struct ALeffectslot { struct { std::atomic<ALeffectslotProps*> Update{nullptr}; - ALfloat Gain{1.0f}; - ALboolean AuxSendAuto{AL_TRUE}; + float Gain{1.0f}; + bool AuxSendAuto{true}; ALeffectslot *Target{nullptr}; ALenum EffectType{AL_EFFECT_NULL}; @@ -68,7 +68,7 @@ struct ALeffectslot { ALfloat DecayTime{0.0f}; ALfloat DecayLFRatio{0.0f}; ALfloat DecayHFRatio{0.0f}; - ALboolean DecayHFLimit{AL_FALSE}; + bool DecayHFLimit{false}; ALfloat AirAbsorptionGainHF{1.0f}; } Params; diff --git a/al/effect.cpp b/al/effect.cpp index f7d17f50..6ea1be39 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -68,7 +68,7 @@ const EffectList gEffectList[15]{ { "dedicated", DEDICATED_EFFECT, AL_EFFECT_DEDICATED_DIALOGUE }, }; -ALboolean DisabledEffects[MAX_EFFECTS]; +bool DisabledEffects[MAX_EFFECTS]; namespace { @@ -316,14 +316,14 @@ START_API_FUNC { if(param == AL_EFFECT_TYPE) { - ALboolean isOk{value == AL_EFFECT_NULL}; + bool isOk{value == AL_EFFECT_NULL}; if(!isOk) { for(const EffectList &effectitem : gEffectList) { if(value == effectitem.val && !DisabledEffects[effectitem.type]) { - isOk = AL_TRUE; + isOk = true; break; } } diff --git a/al/effect.h b/al/effect.h index 25225396..74858dc7 100644 --- a/al/effect.h +++ b/al/effect.h @@ -25,7 +25,7 @@ enum { MAX_EFFECTS }; -extern ALboolean DisabledEffects[MAX_EFFECTS]; +extern bool DisabledEffects[MAX_EFFECTS]; extern ALfloat ReverbBoost; @@ -51,7 +51,7 @@ struct ALeffect { DISABLE_ALLOC() }; -inline ALboolean IsReverbEffect(ALenum type) +inline bool IsReverbEffect(const ALenum type) noexcept { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; } EffectStateFactory *getFactoryByType(ALenum type); diff --git a/al/listener.h b/al/listener.h index 69276f1a..c96b35bf 100644 --- a/al/listener.h +++ b/al/listener.h @@ -52,7 +52,7 @@ struct ALlistener { ALfloat DopplerFactor; ALfloat SpeedOfSound; /* in units per sec! */ - ALboolean SourceDistanceModel; + bool SourceDistanceModel; DistanceModel mDistanceModel; } Params; diff --git a/al/state.cpp b/al/state.cpp index 25a0efd1..ad67559c 100644 --- a/al/state.cpp +++ b/al/state.cpp @@ -126,7 +126,7 @@ START_API_FUNC switch(capability) { case AL_SOURCE_DISTANCE_MODEL: - context->mSourceDistanceModel = AL_TRUE; + context->mSourceDistanceModel = true; DO_UPDATEPROPS(); break; @@ -146,7 +146,7 @@ START_API_FUNC switch(capability) { case AL_SOURCE_DISTANCE_MODEL: - context->mSourceDistanceModel = AL_FALSE; + context->mSourceDistanceModel = false; DO_UPDATEPROPS(); break; @@ -167,7 +167,7 @@ START_API_FUNC switch(capability) { case AL_SOURCE_DISTANCE_MODEL: - value = context->mSourceDistanceModel; + value = context->mSourceDistanceModel ? AL_TRUE : AL_FALSE; break; default: |