diff options
author | Chris Robinson <[email protected]> | 2017-07-31 23:49:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-07-31 23:49:48 -0700 |
commit | 8a735d0ba9db9b4b992172dc197396cc655264d5 (patch) | |
tree | 870ee7ed74e6028d92f3fc431c9b3c3243e08070 /Alc/bformatdec.h | |
parent | 88c0d22e7c72109fb5d7b2ee3276680d36971368 (diff) |
Add a front-stablizer config option for surround sound modes
This improves a stereo (front-left + front-right) sound "image" by generating a
front-center channel signal. Done correctly, it helps reduce the comb effects
and phase errors associated with using only two speakers to simulate center
sounds.
Note that it shouldn't be used if the front-center channel is already included
in the positional audio mix (the dialog effect is okay). In general, it may
actually be better to exclude the front-center channel from the positional
audio mix and use this to generate front-center output.
Diffstat (limited to 'Alc/bformatdec.h')
-rw-r--r-- | Alc/bformatdec.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h index 8f44fc2a..baaecf40 100644 --- a/Alc/bformatdec.h +++ b/Alc/bformatdec.h @@ -72,4 +72,12 @@ void splitterap_init(SplitterAllpass *splitter, ALfloat freq_mult); void splitterap_clear(SplitterAllpass *splitter); void splitterap_process(SplitterAllpass *splitter, ALfloat *restrict samples, ALsizei count); + +typedef struct FrontStablizer { + SplitterAllpass APFilter[MAX_OUTPUT_CHANNELS]; + BandSplitter LFilter, RFilter; + alignas(16) ALfloat LSplit[2][BUFFERSIZE]; + alignas(16) ALfloat RSplit[2][BUFFERSIZE]; +} FrontStablizer; + #endif /* BFORMATDEC_H */ |