aboutsummaryrefslogtreecommitdiffstats
path: root/al/eax
diff options
context:
space:
mode:
Diffstat (limited to 'al/eax')
-rw-r--r--al/eax/call.cpp1
-rw-r--r--al/eax/call.h2
-rw-r--r--al/eax/effect.h40
-rw-r--r--al/eax/fx_slots.cpp6
-rw-r--r--al/eax/fx_slots.h3
-rw-r--r--al/eax/utils.h2
6 files changed, 25 insertions, 29 deletions
diff --git a/al/eax/call.cpp b/al/eax/call.cpp
index 1fd05968..f779c2b0 100644
--- a/al/eax/call.cpp
+++ b/al/eax/call.cpp
@@ -23,6 +23,7 @@ EaxCall::EaxCall(
ALvoid* property_buffer,
ALuint property_size)
: type_{type}, version_{0}, property_set_id_{EaxCallPropertySetId::none}
+ , is_deferred_{(property_id & deferred_flag) != 0}
, property_id_{property_id & ~deferred_flag}, property_source_id_{property_source_id}
, property_buffer_{property_buffer}, property_size_{property_size}
{
diff --git a/al/eax/call.h b/al/eax/call.h
index 9c2706c3..4c35551c 100644
--- a/al/eax/call.h
+++ b/al/eax/call.h
@@ -32,6 +32,7 @@ public:
ALuint property_size);
bool is_get() const noexcept { return type_ == EaxCallType::get; }
+ bool is_deferred() const noexcept { return is_deferred_; }
int get_version() const noexcept { return version_; }
EaxCallPropertySetId get_property_set_id() const noexcept { return property_set_id_; }
ALuint get_property_id() const noexcept { return property_id_; }
@@ -76,6 +77,7 @@ private:
int version_;
EaxFxSlotIndex fx_slot_index_;
EaxCallPropertySetId property_set_id_;
+ bool is_deferred_;
ALuint property_id_;
ALuint property_source_id_;
diff --git a/al/eax/effect.h b/al/eax/effect.h
index b57bf240..f09a2520 100644
--- a/al/eax/effect.h
+++ b/al/eax/effect.h
@@ -35,8 +35,8 @@ template<typename TException, typename TProps>
class EaxEffect4 : public EaxEffect
{
public:
- EaxEffect4(ALenum type, const EaxCall& call)
- : EaxEffect{type}, version_{clamp(call.get_version(), 4, 5)}
+ EaxEffect4(ALenum type, int eax_version)
+ : EaxEffect{type}, version_{clamp(eax_version, 4, 5)}
{}
void initialize()
@@ -70,10 +70,10 @@ protected:
Props d; // Deferred.
}; // State
- int version_;
- Props props_;
- State state4_;
- State state5_;
+ int version_{};
+ Props props_{};
+ State state4_{};
+ State state5_{};
template<typename TValidator, typename TProperty>
static void defer(const EaxCall& call, TProperty& property)
@@ -149,25 +149,25 @@ using EaxEffectUPtr = std::unique_ptr<EaxEffect>;
// Creates EAX4+ effect.
template<typename TEffect>
-EaxEffectUPtr eax_create_eax4_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax4_effect(int eax_version)
{
- auto effect = std::make_unique<TEffect>(call);
+ auto effect = std::make_unique<TEffect>(eax_version);
effect->initialize();
return effect;
}
EaxEffectUPtr eax_create_eax_null_effect();
-EaxEffectUPtr eax_create_eax_chorus_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_distortion_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_echo_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_flanger_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_frequency_shifter_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_vocal_morpher_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_pitch_shifter_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_ring_modulator_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_auto_wah_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_compressor_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_equalizer_effect(const EaxCall& call);
-EaxEffectUPtr eax_create_eax_reverb_effect(const EaxCall& call);
+EaxEffectUPtr eax_create_eax_chorus_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_distortion_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_echo_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_flanger_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_frequency_shifter_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_vocal_morpher_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_pitch_shifter_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_ring_modulator_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_auto_wah_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_compressor_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_equalizer_effect(int eax_version);
+EaxEffectUPtr eax_create_eax_reverb_effect(int eax_version);
#endif // !EAX_EFFECT_INCLUDED
diff --git a/al/eax/fx_slots.cpp b/al/eax/fx_slots.cpp
index 671d2cfb..83de8f78 100644
--- a/al/eax/fx_slots.cpp
+++ b/al/eax/fx_slots.cpp
@@ -57,12 +57,6 @@ ALeffectslot& EaxFxSlots::get(EaxFxSlotIndex index)
return *fx_slots_[index.value()];
}
-void EaxFxSlots::unlock_legacy() noexcept
-{
- fx_slots_[0]->eax_unlock_legacy();
- fx_slots_[1]->eax_unlock_legacy();
-}
-
[[noreturn]]
void EaxFxSlots::fail(
const char* message)
diff --git a/al/eax/fx_slots.h b/al/eax/fx_slots.h
index e7d1452e..cb7e0db4 100644
--- a/al/eax/fx_slots.h
+++ b/al/eax/fx_slots.h
@@ -33,9 +33,6 @@ public:
ALeffectslot& get(
EaxFxSlotIndex index);
- void unlock_legacy() noexcept;
-
-
private:
using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
diff --git a/al/eax/utils.h b/al/eax/utils.h
index 2960c6d7..8ff75a18 100644
--- a/al/eax/utils.h
+++ b/al/eax/utils.h
@@ -6,6 +6,8 @@
#include <string>
#include <type_traits>
+using EaxDirtyFlags = unsigned int;
+
struct EaxAlLowPassParam {
float gain;
float gain_hf;