diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | alc/alc.cpp | 1 | ||||
-rw-r--r-- | alc/alcmain.h | 16 | ||||
-rw-r--r-- | alc/alu.cpp | 1 | ||||
-rw-r--r-- | alc/front_stablizer.h | 24 |
5 files changed, 28 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d00a8b51..2255baeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -623,6 +623,7 @@ SET(ALC_OBJS alc/filters/splitter.h alc/fpu_ctrl.cpp alc/fpu_ctrl.h + alc/front_stablizer.h alc/helpers.cpp alc/hrtf.cpp alc/hrtf.h diff --git a/alc/alc.cpp b/alc/alc.cpp index 9cd99f9d..1bb859f7 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -80,6 +80,7 @@ #include "filters/nfc.h" #include "filters/splitter.h" #include "fpu_ctrl.h" +#include "front_stablizer.h" #include "hrtf.h" #include "inprogext.h" #include "intrusive_ptr.h" diff --git a/alc/alcmain.h b/alc/alcmain.h index b1f1d45e..e1dcd2fa 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -37,6 +37,7 @@ struct ALfilter; struct BackendBase; struct Compressor; struct EffectState; +struct FrontStablizer; struct Uhj2Encoder; struct bs2b; @@ -170,21 +171,6 @@ using FloatBufferLine = std::array<float,BUFFERSIZE>; #define MAX_RESAMPLER_PADDING 48 -struct FrontStablizer { - static constexpr size_t DelayLength{256u}; - - alignas(16) float DelayBuf[MAX_OUTPUT_CHANNELS][DelayLength]; - - BandSplitter LFilter, RFilter; - alignas(16) float LSplit[2][BUFFERSIZE]; - alignas(16) float RSplit[2][BUFFERSIZE]; - - alignas(16) float TempBuf[BUFFERSIZE + DelayLength]; - - DEF_NEWDEL(FrontStablizer) -}; - - struct MixParams { /* Coefficient channel mapping for mixing to the buffer. */ std::array<BFChannelConfig,MAX_OUTPUT_CHANNELS> AmbiMap{}; diff --git a/alc/alu.cpp b/alc/alu.cpp index 889c2271..df9af3fe 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -66,6 +66,7 @@ #include "filters/nfc.h" #include "filters/splitter.h" #include "fpu_ctrl.h" +#include "front_stablizer.h" #include "hrtf.h" #include "inprogext.h" #include "mastering.h" diff --git a/alc/front_stablizer.h b/alc/front_stablizer.h new file mode 100644 index 00000000..ad31508a --- /dev/null +++ b/alc/front_stablizer.h @@ -0,0 +1,24 @@ +#ifndef ALC_FRONT_STABLIZER_H +#define ALC_FRONT_STABLIZER_H + +#include "alcmain.h" +#include "almalloc.h" +#include "devformat.h" +#include "filters/splitter.h" + + +struct FrontStablizer { + static constexpr size_t DelayLength{256u}; + + alignas(16) float DelayBuf[MAX_OUTPUT_CHANNELS][DelayLength]; + + BandSplitter LFilter, RFilter; + alignas(16) float LSplit[2][BUFFERSIZE]; + alignas(16) float RSplit[2][BUFFERSIZE]; + + alignas(16) float TempBuf[BUFFERSIZE + DelayLength]; + + DEF_NEWDEL(FrontStablizer) +}; + +#endif /* ALC_FRONT_STABLIZER_H */ |