diff options
author | Chris Robinson <[email protected]> | 2019-01-05 19:21:25 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-05 19:21:25 -0800 |
commit | cff20c2fe8cdc34958c2634ad742491bd7389e13 (patch) | |
tree | e40d09391c7a38a5785599661ea0ec2159395e6e /Alc/bformatdec.h | |
parent | 641bbf075d741cbe6cdf0c361a9d0ba84a562796 (diff) |
Use BFormatDec for custom and built-in ambisonic decoding
Diffstat (limited to 'Alc/bformatdec.h')
-rw-r--r-- | Alc/bformatdec.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h index 144c22a2..acc71b18 100644 --- a/Alc/bformatdec.h +++ b/Alc/bformatdec.h @@ -4,12 +4,15 @@ #include "alMain.h" #include "filters/biquad.h" #include "filters/splitter.h" +#include "ambidefs.h" #include "almalloc.h" struct AmbDecConf; +using ChannelDec = ALfloat[MAX_AMBI_COEFFS]; + class BFormatDec { public: static constexpr size_t sNumBands{2}; @@ -38,7 +41,9 @@ private: ALboolean mDualBand; public: - void reset(const AmbDecConf *conf, ALsizei chancount, ALuint srate, const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]); + void reset(const AmbDecConf *conf, bool allow_2band, ALsizei inchans, ALuint srate, const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]); + + void reset(ALsizei inchans, ALuint srate, ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]); /* Decodes the ambisonic input to the given output channels. */ void process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei SamplesToDo); |