aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-07 13:52:51 -0800
committerChris Robinson <[email protected]>2022-02-07 13:53:57 -0800
commitf23c7fe8ba77d4d406d37c60501f961313db7d1a (patch)
tree569b57749d759f98bf114beac1893c1341dcf702 /alc
parent1807e083c8a4579979748d062e7b54a19c3b76b9 (diff)
Avoid a proxy ALfilter object for EAX source properties
Diffstat (limited to 'alc')
-rw-r--r--alc/context.cpp29
-rw-r--r--alc/context.h8
2 files changed, 1 insertions, 36 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index 902e86be..1e363a41 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -467,22 +467,6 @@ void ALCcontext::eax_uninitialize() noexcept
eax_is_tried_ = false;
eax_fx_slots_.uninitialize();
- eax_al_filter_ = nullptr;
-}
-
-void ALCcontext::eax_initialize_source(
- ALsource& al_source) noexcept
-try
-{
- auto param = EaxSourceInitParam{};
- param.al_context = this;
- param.al_filter = eax_al_filter_.get();
-
- al_source.eax_initialize(param);
-}
-catch (...)
-{
- eax_log_exception("Failed to initialize a source.");
}
ALenum ALCcontext::eax_eax_set(
@@ -682,7 +666,6 @@ void ALCcontext::eax_initialize()
eax_ensure_compatibility();
eax_initialize_filter_gain();
- eax_initialize_filter();
eax_set_defaults();
eax_set_air_absorbtion_hf();
eax_initialize_fx_slots();
@@ -775,16 +758,6 @@ void ALCcontext::eax_set_defaults() noexcept
eax_d_ = eax_;
}
-void ALCcontext::eax_initialize_filter()
-{
- eax_al_filter_ = eax_create_al_low_pass_filter(*this);
-
- if (!eax_al_filter_)
- {
- eax_fail("Failed to make a low-pass filter.");
- }
-}
-
void ALCcontext::eax_dispatch_fx_slot(
const EaxEaxCall& eax_call)
{
@@ -979,7 +952,7 @@ void ALCcontext::eax_initialize_sources()
for (auto& source : SourceListEnumerator{mSourceList})
{
- eax_initialize_source(source);
+ source.eax_initialize(this);
}
}
diff --git a/alc/context.h b/alc/context.h
index b964d813..331b21b0 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -20,8 +20,6 @@
#include "vector.h"
#ifdef ALSOFT_EAX
-#include "al/filter.h"
-
#include "al/eax_eax_call.h"
#include "al/eax_fx_slot_index.h"
#include "al/eax_fx_slots.h"
@@ -213,9 +211,6 @@ public:
void eax_uninitialize() noexcept;
- void eax_initialize_source(
- ALsource& al_source) noexcept;
-
ALenum eax_eax_set(
const GUID* property_set_id,
@@ -336,7 +331,6 @@ private:
EaxContextSharedDirtyFlags eax_context_shared_dirty_flags_{};
- EaxAlFilterUPtr eax_al_filter_{};
Eax eax_{};
Eax eax_d_{};
EAXSESSIONPROPERTIES eax_session_{};
@@ -383,8 +377,6 @@ private:
void eax_set_defaults() noexcept;
- void eax_initialize_filter();
-
void eax_initialize_sources();