aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/bformatdec.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-01-06 06:50:58 -0800
committerChris Robinson <[email protected]>2019-01-06 06:50:58 -0800
commitf5b6d761ffb002532ee08e008cfd5fb87fdf6cfd (patch)
tree6c007c8f6d98b0449a095e435bd1f1f1eb578152 /Alc/bformatdec.h
parent13056b45b05386097af1416f773522cc9840c3bb (diff)
Apply an all-pass on the existing output when upsampling ambisonics
Diffstat (limited to 'Alc/bformatdec.h')
-rw-r--r--Alc/bformatdec.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h
index 753c2b6f..9fd57b36 100644
--- a/Alc/bformatdec.h
+++ b/Alc/bformatdec.h
@@ -36,6 +36,7 @@ private:
BandSplitter Splitter;
ALfloat Gains[sNumBands];
} mUpsampler[4];
+ SplitterAllpass mUpAllpass[MAX_OUTPUT_CHANNELS];
ALsizei mNumChannels;
ALboolean mDualBand;
@@ -49,7 +50,7 @@ public:
void process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei SamplesToDo);
/* Up-samples a first-order input to the decoder's configuration. */
- void upSample(ALfloat (*OutBuffer)[BUFFERSIZE], const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
+ void upSample(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
DEF_NEWDEL(BFormatDec)
};
@@ -60,15 +61,17 @@ public:
*/
class AmbiUpsampler {
static constexpr ALsizei sNumBands{2};
+
+ alignas(16) ALfloat mSamples[sNumBands][BUFFERSIZE];
struct {
BandSplitter Splitter;
ALfloat Gains[sNumBands];
} mInput[4];
- alignas(16) ALfloat mSamples[sNumBands][BUFFERSIZE];
+ SplitterAllpass mAllpass[MAX_OUTPUT_CHANNELS];
public:
void reset(const ALsizei out_order, const ALfloat xover_norm);
- void process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
+ void process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
DEF_NEWDEL(AmbiUpsampler)
};