aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-05 10:34:21 -0800
committerChris Robinson <[email protected]>2023-02-05 10:34:21 -0800
commitd7cabd2c57025c7f3dad81c22c397ac27183102e (patch)
treed47ce186a916ed5bf0181c8d014e494a6e7048ca /al/source.h
parent70c14cd560db819f180073052f4c2bfae5cf3c31 (diff)
Don't set an EAX version by default for sources
Presuming sources start in a neutral state for EAX effects, that is they're not affected by EAX by default, there's no need to set an active EAX state for one until the app sets an EAX property on it. Since the deferred and immediate properties are stored independently per-version, they can always be set to defaults, and simply not have a particular version committed as active until the app sets an EAX property, which will inherently set the active version.
Diffstat (limited to 'al/source.h')
-rw-r--r--al/source.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/al/source.h b/al/source.h
index bcee0e18..2419df47 100644
--- a/al/source.h
+++ b/al/source.h
@@ -161,21 +161,16 @@ struct ALsource {
public:
void eax_initialize(ALCcontext *context) noexcept;
void eax_dispatch(const EaxCall& call);
- void eax_commit() { eax_commit(EaxCommitType::normal); }
+ void eax_commit();
void eax_commit_and_update();
void eax_mark_as_changed() { eax_changed_ = true; }
- bool eax_is_initialized() const noexcept { return eax_al_context_ != nullptr; }
+ bool eax_is_initialized() const noexcept { return eax_version_ != 0; }
static ALsource* eax_lookup_source(ALCcontext& al_context, ALuint source_id) noexcept;
private:
using Exception = EaxSourceException;
- enum class EaxCommitType {
- normal,
- forced,
- };
-
static constexpr auto eax_max_speakers = 9;
using EaxFxSlotIds = const GUID* [EAX_MAX_FXSLOTS];
@@ -1044,7 +1039,6 @@ private:
const EaxAlLowPassParam &filter);
void eax_commit_active_fx_slots();
- void eax_commit(EaxCommitType commit_type);
#endif // ALSOFT_EAX
};