From cff20c2fe8cdc34958c2634ad742491bd7389e13 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 5 Jan 2019 19:21:25 -0800 Subject: Use BFormatDec for custom and built-in ambisonic decoding --- Alc/bformatdec.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Alc/bformatdec.h') 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); -- cgit v1.2.3