aboutsummaryrefslogtreecommitdiffstats
path: root/al/effects
diff options
context:
space:
mode:
Diffstat (limited to 'al/effects')
-rw-r--r--al/effects/autowah.cpp10
-rw-r--r--al/effects/chorus.cpp16
-rw-r--r--al/effects/compressor.cpp10
-rw-r--r--al/effects/distortion.cpp10
-rw-r--r--al/effects/echo.cpp10
-rw-r--r--al/effects/effects.cpp32
-rw-r--r--al/effects/effects.h3
-rw-r--r--al/effects/equalizer.cpp10
-rw-r--r--al/effects/fshifter.cpp10
-rw-r--r--al/effects/modulator.cpp10
-rw-r--r--al/effects/pshifter.cpp10
-rw-r--r--al/effects/reverb.cpp10
-rw-r--r--al/effects/vmorpher.cpp10
13 files changed, 73 insertions, 78 deletions
diff --git a/al/effects/autowah.cpp b/al/effects/autowah.cpp
index 7e0e34aa..3400f5a4 100644
--- a/al/effects/autowah.cpp
+++ b/al/effects/autowah.cpp
@@ -127,7 +127,7 @@ public:
class EaxAutoWahEffect final : public EaxEffect4<EaxAutoWahEffectException, EAXAUTOWAHPROPERTIES> {
public:
- EaxAutoWahEffect(const EaxCall& call);
+ EaxAutoWahEffect(int eax_version);
private:
struct AttackTimeValidator {
@@ -197,8 +197,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxAutoWahEffect
-EaxAutoWahEffect::EaxAutoWahEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_AUTOWAH, call}
+EaxAutoWahEffect::EaxAutoWahEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_AUTOWAH, eax_version}
{}
void EaxAutoWahEffect::set_defaults(Props& props)
@@ -310,9 +310,9 @@ bool EaxAutoWahEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_auto_wah_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_auto_wah_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxAutoWahEffect>(call);
+ return eax_create_eax4_effect<EaxAutoWahEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/chorus.cpp b/al/effects/chorus.cpp
index 0d4283c9..1651ebb9 100644
--- a/al/effects/chorus.cpp
+++ b/al/effects/chorus.cpp
@@ -433,8 +433,8 @@ public:
using typename Base::State;
using Base::defer;
- EaxChorusFlangerEffect(const EaxCall& call)
- : Base{Traits::efx_effect(), call}
+ EaxChorusFlangerEffect(int eax_version)
+ : Base{Traits::efx_effect(), eax_version}
{}
private:
@@ -712,23 +712,23 @@ private:
}; // EaxChorusFlangerEffect
template<typename TTraits>
-EaxEffectUPtr eax_create_eax_chorus_flanger_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_chorus_flanger_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxChorusFlangerEffect<TTraits>>(call);
+ return eax_create_eax4_effect<EaxChorusFlangerEffect<TTraits>>(eax_version);
}
} // namespace
// ==========================================================================
-EaxEffectUPtr eax_create_eax_chorus_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_chorus_effect(int eax_version)
{
- return eax_create_eax_chorus_flanger_effect<EaxChorusTraits>(call);
+ return eax_create_eax_chorus_flanger_effect<EaxChorusTraits>(eax_version);
}
-EaxEffectUPtr eax_create_eax_flanger_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_flanger_effect(int eax_version)
{
- return eax_create_eax_chorus_flanger_effect<EaxFlangerTraits>(call);
+ return eax_create_eax_chorus_flanger_effect<EaxFlangerTraits>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/compressor.cpp b/al/effects/compressor.cpp
index 9824d11b..df318709 100644
--- a/al/effects/compressor.cpp
+++ b/al/effects/compressor.cpp
@@ -91,7 +91,7 @@ public:
class EaxCompressorEffect final : public EaxEffect4<EaxCompressorEffectException, EAXAGCCOMPRESSORPROPERTIES>
{
public:
- EaxCompressorEffect(const EaxCall& call);
+ EaxCompressorEffect(int eax_version);
private:
struct OnOffValidator {
@@ -122,8 +122,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxCompressorEffect
-EaxCompressorEffect::EaxCompressorEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_COMPRESSOR, call}
+EaxCompressorEffect::EaxCompressorEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_COMPRESSOR, eax_version}
{}
void EaxCompressorEffect::set_defaults(Props& props)
@@ -182,9 +182,9 @@ bool EaxCompressorEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_compressor_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_compressor_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxCompressorEffect>(call);
+ return eax_create_eax4_effect<EaxCompressorEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/distortion.cpp b/al/effects/distortion.cpp
index b58412b9..80e5f46d 100644
--- a/al/effects/distortion.cpp
+++ b/al/effects/distortion.cpp
@@ -133,7 +133,7 @@ public:
class EaxDistortionEffect final : public EaxEffect4<EaxDistortionEffectException, EAXDISTORTIONPROPERTIES>
{
public:
- EaxDistortionEffect(const EaxCall& call);
+ EaxDistortionEffect(int eax_version);
private:
struct EdgeValidator {
@@ -216,8 +216,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxDistortionEffect
-EaxDistortionEffect::EaxDistortionEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_DISTORTION, call}
+EaxDistortionEffect::EaxDistortionEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_DISTORTION, eax_version}
{}
void EaxDistortionEffect::set_defaults(Props& props)
@@ -347,9 +347,9 @@ bool EaxDistortionEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_distortion_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_distortion_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxDistortionEffect>(call);
+ return eax_create_eax4_effect<EaxDistortionEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/echo.cpp b/al/effects/echo.cpp
index f25c94bf..c0968676 100644
--- a/al/effects/echo.cpp
+++ b/al/effects/echo.cpp
@@ -130,7 +130,7 @@ public:
class EaxEchoEffect final : public EaxEffect4<EaxEchoEffectException, EAXECHOPROPERTIES>
{
public:
- EaxEchoEffect(const EaxCall& call);
+ EaxEchoEffect(int eax_version);
private:
struct DelayValidator {
@@ -213,8 +213,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxEchoEffect
-EaxEchoEffect::EaxEchoEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_ECHO, call}
+EaxEchoEffect::EaxEchoEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_ECHO, eax_version}
{}
void EaxEchoEffect::set_defaults(Props& props)
@@ -344,9 +344,9 @@ bool EaxEchoEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_echo_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_echo_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxEchoEffect>(call);
+ return eax_create_eax4_effect<EaxEchoEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/effects.cpp b/al/effects/effects.cpp
index e4e61231..7c8447e4 100644
--- a/al/effects/effects.cpp
+++ b/al/effects/effects.cpp
@@ -1,16 +1,12 @@
-
#include "config.h"
#ifdef ALSOFT_EAX
-#include "effects.h"
-
#include <cassert>
-
#include "AL/efx.h"
+#include "effects.h"
-
-EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, const EaxCall& call)
+EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, int eax_version)
{
#define EAX_PREFIX "[EAX_MAKE_EAX_EFFECT] "
@@ -20,40 +16,40 @@ EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, const EaxCall& call)
return eax_create_eax_null_effect();
case AL_EFFECT_CHORUS:
- return eax_create_eax_chorus_effect(call);
+ return eax_create_eax_chorus_effect(eax_version);
case AL_EFFECT_DISTORTION:
- return eax_create_eax_distortion_effect(call);
+ return eax_create_eax_distortion_effect(eax_version);
case AL_EFFECT_ECHO:
- return eax_create_eax_echo_effect(call);
+ return eax_create_eax_echo_effect(eax_version);
case AL_EFFECT_FLANGER:
- return eax_create_eax_flanger_effect(call);
+ return eax_create_eax_flanger_effect(eax_version);
case AL_EFFECT_FREQUENCY_SHIFTER:
- return eax_create_eax_frequency_shifter_effect(call);
+ return eax_create_eax_frequency_shifter_effect(eax_version);
case AL_EFFECT_VOCAL_MORPHER:
- return eax_create_eax_vocal_morpher_effect(call);
+ return eax_create_eax_vocal_morpher_effect(eax_version);
case AL_EFFECT_PITCH_SHIFTER:
- return eax_create_eax_pitch_shifter_effect(call);
+ return eax_create_eax_pitch_shifter_effect(eax_version);
case AL_EFFECT_RING_MODULATOR:
- return eax_create_eax_ring_modulator_effect(call);
+ return eax_create_eax_ring_modulator_effect(eax_version);
case AL_EFFECT_AUTOWAH:
- return eax_create_eax_auto_wah_effect(call);
+ return eax_create_eax_auto_wah_effect(eax_version);
case AL_EFFECT_COMPRESSOR:
- return eax_create_eax_compressor_effect(call);
+ return eax_create_eax_compressor_effect(eax_version);
case AL_EFFECT_EQUALIZER:
- return eax_create_eax_equalizer_effect(call);
+ return eax_create_eax_equalizer_effect(eax_version);
case AL_EFFECT_EAXREVERB:
- return eax_create_eax_reverb_effect(call);
+ return eax_create_eax_reverb_effect(eax_version);
default:
assert(false && "Unsupported AL effect type.");
diff --git a/al/effects/effects.h b/al/effects/effects.h
index 164c0d19..acfeec6a 100644
--- a/al/effects/effects.h
+++ b/al/effects/effects.h
@@ -6,7 +6,6 @@
#include "core/except.h"
#ifdef ALSOFT_EAX
-#include "al/eax/call.h"
#include "al/eax/effect.h"
#endif // ALSOFT_EAX
@@ -87,7 +86,7 @@ extern const EffectVtable ConvolutionEffectVtable;
#ifdef ALSOFT_EAX
-EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, const EaxCall& call);
+EaxEffectUPtr eax_create_eax_effect(ALenum al_effect_type, int eax_version);
#endif // ALSOFT_EAX
#endif /* AL_EFFECTS_EFFECTS_H */
diff --git a/al/effects/equalizer.cpp b/al/effects/equalizer.cpp
index 80dd1c4b..0ee351f3 100644
--- a/al/effects/equalizer.cpp
+++ b/al/effects/equalizer.cpp
@@ -188,7 +188,7 @@ public:
class EaxEqualizerEffect final : public EaxEffect4<EaxEqualizerEffectException, EAXEQUALIZERPROPERTIES>
{
public:
- EaxEqualizerEffect(const EaxCall& call);
+ EaxEqualizerEffect(int eax_version);
private:
struct LowGainValidator {
@@ -336,8 +336,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxEqualizerEffect
-EaxEqualizerEffect::EaxEqualizerEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_EQUALIZER, call}
+EaxEqualizerEffect::EaxEqualizerEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_EQUALIZER, eax_version}
{}
void EaxEqualizerEffect::set_defaults(Props& props)
@@ -557,9 +557,9 @@ bool EaxEqualizerEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_equalizer_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_equalizer_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxEqualizerEffect>(call);
+ return eax_create_eax4_effect<EaxEqualizerEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/fshifter.cpp b/al/effects/fshifter.cpp
index 2b1710ad..400c0bf4 100644
--- a/al/effects/fshifter.cpp
+++ b/al/effects/fshifter.cpp
@@ -149,7 +149,7 @@ public:
class EaxFrequencyShifterEffect final : public EaxEffect4<EaxFrequencyShifterEffectException, EAXFREQUENCYSHIFTERPROPERTIES> {
public:
- EaxFrequencyShifterEffect(const EaxCall& call);
+ EaxFrequencyShifterEffect(int eax_version);
private:
struct FrequencyValidator {
@@ -207,8 +207,8 @@ private:
}; // EaxFrequencyShifterEffect
-EaxFrequencyShifterEffect::EaxFrequencyShifterEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_FREQUENCY_SHIFTER, call}
+EaxFrequencyShifterEffect::EaxFrequencyShifterEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_FREQUENCY_SHIFTER, eax_version}
{}
void EaxFrequencyShifterEffect::set_defaults(Props& props)
@@ -308,9 +308,9 @@ bool EaxFrequencyShifterEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_frequency_shifter_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_frequency_shifter_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxFrequencyShifterEffect>(call);
+ return eax_create_eax4_effect<EaxFrequencyShifterEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/modulator.cpp b/al/effects/modulator.cpp
index 774fb767..e917e3a0 100644
--- a/al/effects/modulator.cpp
+++ b/al/effects/modulator.cpp
@@ -156,7 +156,7 @@ public:
class EaxRingModulatorEffect final : public EaxEffect4<EaxRingModulatorEffectException, EAXRINGMODULATORPROPERTIES>
{
public:
- EaxRingModulatorEffect(const EaxCall& call);
+ EaxRingModulatorEffect(int eax_version);
private:
struct FrequencyValidator {
@@ -213,8 +213,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxRingModulatorEffect
-EaxRingModulatorEffect::EaxRingModulatorEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_RING_MODULATOR, call}
+EaxRingModulatorEffect::EaxRingModulatorEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_RING_MODULATOR, eax_version}
{}
void EaxRingModulatorEffect::set_defaults(Props& props)
@@ -311,9 +311,9 @@ bool EaxRingModulatorEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_ring_modulator_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_ring_modulator_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxRingModulatorEffect>(call);
+ return eax_create_eax4_effect<EaxRingModulatorEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/pshifter.cpp b/al/effects/pshifter.cpp
index 51dbdd8f..9711da28 100644
--- a/al/effects/pshifter.cpp
+++ b/al/effects/pshifter.cpp
@@ -102,7 +102,7 @@ public:
class EaxPitchShifterEffect final : public EaxEffect4<EaxPitchShifterEffectException, EAXPITCHSHIFTERPROPERTIES> {
public:
- EaxPitchShifterEffect(const EaxCall& call);
+ EaxPitchShifterEffect(int eax_version);
private:
struct CoarseTuneValidator {
@@ -146,8 +146,8 @@ private:
bool commit_props(const Props& old_i) override;
}; // EaxPitchShifterEffect
-EaxPitchShifterEffect::EaxPitchShifterEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_PITCH_SHIFTER, call}
+EaxPitchShifterEffect::EaxPitchShifterEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_PITCH_SHIFTER, eax_version}
{}
void EaxPitchShifterEffect::set_defaults(Props& props)
@@ -223,9 +223,9 @@ bool EaxPitchShifterEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_pitch_shifter_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_pitch_shifter_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxPitchShifterEffect>(call);
+ return eax_create_eax4_effect<EaxPitchShifterEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/reverb.cpp b/al/effects/reverb.cpp
index 07d6dfcf..19b52d66 100644
--- a/al/effects/reverb.cpp
+++ b/al/effects/reverb.cpp
@@ -577,7 +577,7 @@ public:
class EaxReverbEffect final : public EaxEffect
{
public:
- EaxReverbEffect(const EaxCall& call) noexcept;
+ EaxReverbEffect(int eax_version) noexcept;
void dispatch(const EaxCall& call) override;
/*[[nodiscard]]*/ bool commit() override;
@@ -1194,8 +1194,8 @@ private:
static void translate(const Props2& src, Props3& dst) noexcept;
}; // EaxReverbEffect
-EaxReverbEffect::EaxReverbEffect(const EaxCall& call) noexcept
- : EaxEffect{AL_EFFECT_EAXREVERB}, version_{call.get_version()}
+EaxReverbEffect::EaxReverbEffect(int eax_version) noexcept
+ : EaxEffect{AL_EFFECT_EAXREVERB}, version_{eax_version}
{
set_defaults();
set_current_defaults();
@@ -1986,9 +1986,9 @@ void EaxReverbEffect::translate(const Props2& src, Props3& dst) noexcept
} // namespace
-EaxEffectUPtr eax_create_eax_reverb_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_reverb_effect(int eax_version)
{
- return std::make_unique<EaxReverbEffect>(call);
+ return std::make_unique<EaxReverbEffect>(eax_version);
}
#endif // ALSOFT_EAX
diff --git a/al/effects/vmorpher.cpp b/al/effects/vmorpher.cpp
index 95f98db5..e1b7a698 100644
--- a/al/effects/vmorpher.cpp
+++ b/al/effects/vmorpher.cpp
@@ -267,7 +267,7 @@ public:
class EaxVocalMorpherEffect final : public EaxEffect4<EaxVocalMorpherEffectException, EAXVOCALMORPHERPROPERTIES> {
public:
- EaxVocalMorpherEffect(const EaxCall& call);
+ EaxVocalMorpherEffect(int eax_version);
private:
struct PhonemeAValidator {
@@ -363,8 +363,8 @@ private:
bool commit_props(const Props& props) override;
}; // EaxVocalMorpherEffect
-EaxVocalMorpherEffect::EaxVocalMorpherEffect(const EaxCall& call)
- : EaxEffect4{AL_EFFECT_VOCAL_MORPHER, call}
+EaxVocalMorpherEffect::EaxVocalMorpherEffect(int eax_version)
+ : EaxEffect4{AL_EFFECT_VOCAL_MORPHER, eax_version}
{}
void EaxVocalMorpherEffect::set_defaults(Props& props)
@@ -570,9 +570,9 @@ bool EaxVocalMorpherEffect::commit_props(const Props& props)
} // namespace
-EaxEffectUPtr eax_create_eax_vocal_morpher_effect(const EaxCall& call)
+EaxEffectUPtr eax_create_eax_vocal_morpher_effect(int eax_version)
{
- return eax_create_eax4_effect<EaxVocalMorpherEffect>(call);
+ return eax_create_eax4_effect<EaxVocalMorpherEffect>(eax_version);
}
#endif // ALSOFT_EAX