aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-22 22:35:37 -0800
committerChris Robinson <[email protected]>2019-02-22 22:35:37 -0800
commit317206e8f3312fb84a61b3681303fb5f8f92af7d (patch)
tree40d5d97477c2a850fcd831bae3f11c77e76803bb /Alc
parent45378fe6872fc0e27f1865fe909b22788d486c7b (diff)
Remove the FOAOut mixing buffer and associated post-processes
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp20
-rw-r--r--Alc/alu.cpp15
-rw-r--r--Alc/bformatdec.cpp104
-rw-r--r--Alc/bformatdec.h37
-rw-r--r--Alc/effects/reverb.cpp2
-rw-r--r--Alc/panning.cpp122
6 files changed, 11 insertions, 289 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index b68a16e0..9bba1b52 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -1822,8 +1822,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->Dry.Buffer = nullptr;
device->Dry.NumChannels = 0;
- device->FOAOut.Buffer = nullptr;
- device->FOAOut.NumChannels = 0;
device->RealOut.Buffer = nullptr;
device->RealOut.NumChannels = 0;
device->MixBuffer.clear();
@@ -1928,12 +1926,11 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
);
aluInitRenderer(device, hrtf_id, hrtf_appreq, hrtf_userreq);
- TRACE("Channel config, Dry: %d, FOA: %d, Real: %d\n", device->Dry.NumChannels,
- device->FOAOut.NumChannels, device->RealOut.NumChannels);
+ TRACE("Channel config, Main: %d, Real: %d\n", device->Dry.NumChannels,
+ device->RealOut.NumChannels);
/* Allocate extra channels for any post-filter output. */
- ALsizei num_chans{device->Dry.NumChannels + device->FOAOut.NumChannels +
- device->RealOut.NumChannels};
+ const ALsizei num_chans{device->Dry.NumChannels + device->RealOut.NumChannels};
TRACE("Allocating %d channels, " SZFMT " bytes\n", num_chans,
num_chans*sizeof(device->MixBuffer[0]));
@@ -1941,22 +1938,13 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->Dry.Buffer = &reinterpret_cast<ALfloat(&)[BUFFERSIZE]>(device->MixBuffer[0]);
if(device->RealOut.NumChannels != 0)
- device->RealOut.Buffer = device->Dry.Buffer + device->Dry.NumChannels +
- device->FOAOut.NumChannels;
+ device->RealOut.Buffer = device->Dry.Buffer + device->Dry.NumChannels;
else
{
device->RealOut.Buffer = device->Dry.Buffer;
device->RealOut.NumChannels = device->Dry.NumChannels;
}
- if(device->FOAOut.NumChannels != 0)
- device->FOAOut.Buffer = device->Dry.Buffer + device->Dry.NumChannels;
- else
- {
- device->FOAOut.Buffer = device->Dry.Buffer;
- device->FOAOut.NumChannels = device->Dry.NumChannels;
- }
-
device->NumAuxSends = new_sends;
TRACE("Max sources: %d (%d + %d), effect slots: %d, sends: %d\n",
device->SourcesMax, device->NumMonoSources, device->NumStereoSources,
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index f835f9fd..6512de78 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -127,10 +127,6 @@ inline HrtfDirectMixerFunc SelectHrtfMixer(void)
void ProcessHrtf(ALCdevice *device, const ALsizei SamplesToDo)
{
- if(AmbiUpsampler *ambiup{device->AmbiUp.get()})
- ambiup->process(device->Dry.Buffer, device->Dry.NumChannels, device->FOAOut.Buffer,
- device->FOAOut.NumChannels, SamplesToDo);
-
/* HRTF is stereo output only. */
const int lidx{(device->RealOut.ChannelName[0]==FrontLeft) ? 0 : 1};
const int ridx{(device->RealOut.ChannelName[0]==FrontLeft) ? 1 : 0};
@@ -146,19 +142,10 @@ void ProcessHrtf(ALCdevice *device, const ALsizei SamplesToDo)
void ProcessAmbiDec(ALCdevice *device, const ALsizei SamplesToDo)
{
BFormatDec *ambidec{device->AmbiDecoder.get()};
- if(device->Dry.Buffer != device->FOAOut.Buffer)
- ambidec->upSample(device->Dry.Buffer, device->Dry.NumChannels, device->FOAOut.Buffer,
- device->FOAOut.NumChannels, SamplesToDo);
ambidec->process(device->RealOut.Buffer, device->RealOut.NumChannels, device->Dry.Buffer,
SamplesToDo);
}
-void ProcessAmbiUp(ALCdevice *device, const ALsizei SamplesToDo)
-{
- device->AmbiUp->process(device->RealOut.Buffer, device->RealOut.NumChannels,
- device->FOAOut.Buffer, device->FOAOut.NumChannels, SamplesToDo);
-}
-
void ProcessUhj(ALCdevice *device, const ALsizei SamplesToDo)
{
/* UHJ is stereo output only. */
@@ -203,8 +190,6 @@ void aluSelectPostProcess(ALCdevice *device)
device->PostProcess = ProcessHrtf;
else if(device->AmbiDecoder)
device->PostProcess = ProcessAmbiDec;
- else if(device->AmbiUp)
- device->PostProcess = ProcessAmbiUp;
else if(device->Uhj_Encoder)
device->PostProcess = ProcessUhj;
else if(device->Bs2b)
diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp
index efac73ca..bb88c1b1 100644
--- a/Alc/bformatdec.cpp
+++ b/Alc/bformatdec.cpp
@@ -74,22 +74,6 @@ void BFormatDec::reset(const AmbDecConf *conf, bool allow_2band, ALsizei inchans
const ALfloat xover_norm{conf->XOverFreq / static_cast<float>(srate)};
- const ALsizei out_order{
- (conf->ChanMask > AMBI_3ORDER_MASK) ? 4 :
- (conf->ChanMask > AMBI_2ORDER_MASK) ? 3 :
- (conf->ChanMask > AMBI_1ORDER_MASK) ? 2 : 1};
- {
- const ALfloat (&hfscales)[MAX_AMBI_ORDER+1] = GetDecoderHFScales(out_order);
-
- mUpsampler[0].Splitter.init(xover_norm);
- mUpsampler[0].Gains[sHFBand] = Ambi3DDecoderHFScale[0] / hfscales[0];
- mUpsampler[0].Gains[sLFBand] = 1.0f;
- mUpsampler[1].Splitter.init(xover_norm);
- mUpsampler[1].Gains[sHFBand] = Ambi3DDecoderHFScale[1] / hfscales[1];
- mUpsampler[1].Gains[sLFBand] = 1.0f;
- std::fill(std::begin(mUpsampler)+2, std::end(mUpsampler), mUpsampler[1]);
- }
-
const bool periphonic{(conf->ChanMask&AMBI_PERIPHONIC_MASK) != 0};
const std::array<float,MAX_AMBI_CHANNELS> &coeff_scale = GetAmbiScales(conf->CoeffScale);
const size_t coeff_count{periphonic ? MAX_AMBI_CHANNELS : MAX_AMBI2D_CHANNELS};
@@ -138,7 +122,7 @@ void BFormatDec::reset(const AmbDecConf *conf, bool allow_2band, ALsizei inchans
}
}
-void BFormatDec::reset(const ALsizei inchans, const ALfloat xover_norm, const ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS])
+void BFormatDec::reset(const ALsizei inchans, const ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS])
{
mSamples.clear();
mSamplesHF = nullptr;
@@ -154,25 +138,6 @@ void BFormatDec::reset(const ALsizei inchans, const ALfloat xover_norm, const AL
{ return mask | (1 << chan); }
);
- const ALsizei out_order{
- (inchans > 7) ? 4 :
- (inchans > 5) ? 3 :
- (inchans > 3) ? 2 : 1};
- {
- const ALfloat (&hfscales)[MAX_AMBI_ORDER+1] = GetDecoderHFScales(out_order);
-
- mUpsampler[0].Splitter.init(xover_norm);
- mUpsampler[0].Gains[sHFBand] = Ambi3DDecoderHFScale[0] / hfscales[0];
- mUpsampler[0].Gains[sLFBand] = 1.0f;
- mUpsampler[1].Splitter.init(xover_norm);
- mUpsampler[1].Gains[sHFBand] = Ambi3DDecoderHFScale[1] / hfscales[1];
- mUpsampler[1].Gains[sLFBand] = 1.0f;
- std::fill(std::begin(mUpsampler)+2, std::end(mUpsampler), mUpsampler[1]);
-
- mUpAllpass[0].init(xover_norm);
- std::fill(std::begin(mUpAllpass)+1, std::end(mUpAllpass), mUpAllpass[0]);
- }
-
for(ALsizei i{0};i < chancount;i++)
{
const ALfloat (&coeffs)[MAX_AMBI_CHANNELS] = chancoeffs[chanmap[i]];
@@ -220,42 +185,8 @@ void BFormatDec::process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChan
}
}
-void BFormatDec::upSample(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo)
-{
- /* This up-sampler leverages the differences observed in dual-band higher-
- * order decoder matrices compared to first-order. For the same output
- * channel configuration, the low-frequency matrix has identical
- * coefficients in the shared input channels, while the high-frequency
- * matrix has extra scalars applied to the W channel and X/Y/Z channels.
- * Mixing the first-order content into the higher-order stream, with the
- * appropriate counter-scales applied to the HF response, results in the
- * subsequent higher-order decode generating the same response as a first-
- * order decode.
- */
-
- /* NOTE: Because we can't treat the first-order signal as completely
- * decorrelated from the existing output (it may contain the reverb, echo,
- * etc, portion) phase interference is a possibility if not kept coherent.
- * As such, we need to apply an all-pass on the existing output so that it
- * stays aligned with the upsampled signal.
- */
-
- ASSUME(InChannels > 0);
- for(ALsizei i{0};i < InChannels;i++)
- {
- mUpsampler[i].Splitter.process(mSamples[sHFBand].data(), mSamples[sLFBand].data(),
- InSamples[i], SamplesToDo);
- mUpAllpass[i].process(OutBuffer[i], SamplesToDo);
- MixRowSamples(OutBuffer[i], mUpsampler[i].Gains,
- &reinterpret_cast<ALfloat(&)[BUFFERSIZE]>(mSamples[0]), sNumBands, 0, SamplesToDo);
- }
- ASSUME(OutChannels > InChannels);
- for(ALsizei i{InChannels};i < OutChannels;i++)
- mUpAllpass[i].process(OutBuffer[i], SamplesToDo);
-}
-
-std::array<ALfloat,MAX_AMBI_ORDER+1> AmbiUpsampler::GetHFOrderScales(const ALsizei in_order, const ALsizei out_order) noexcept
+std::array<ALfloat,MAX_AMBI_ORDER+1> BFormatDec::GetHFOrderScales(const ALsizei in_order, const ALsizei out_order) noexcept
{
std::array<ALfloat,MAX_AMBI_ORDER+1> ret{};
@@ -270,34 +201,3 @@ std::array<ALfloat,MAX_AMBI_ORDER+1> AmbiUpsampler::GetHFOrderScales(const ALsiz
return ret;
}
-
-void AmbiUpsampler::reset(const ALsizei out_order, const ALfloat xover_norm)
-{
- const ALfloat (&hfscales)[MAX_AMBI_ORDER+1] = GetDecoderHFScales(out_order);
-
- mInput[0].Splitter.init(xover_norm);
- mInput[0].Gains[sHFBand] = Ambi3DDecoderHFScale[0] / hfscales[0];
- mInput[0].Gains[sLFBand] = 1.0f;
- mInput[1].Splitter = mInput[0].Splitter;
- mInput[1].Gains[sHFBand] = Ambi3DDecoderHFScale[1] / hfscales[1];
- mInput[1].Gains[sLFBand] = 1.0f;
- std::fill(std::begin(mInput)+2, std::end(mInput), mInput[1]);
-
- mAllpass[0].init(xover_norm);
- std::fill(std::begin(mAllpass)+1, std::end(mAllpass), mAllpass[0]);
-}
-
-void AmbiUpsampler::process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo)
-{
- ASSUME(InChannels > 0);
- for(ALsizei i{0};i < InChannels;i++)
- {
- mInput[i].Splitter.process(mSamples[sHFBand], mSamples[sLFBand], InSamples[i],
- SamplesToDo);
- mAllpass[i].process(OutBuffer[i], SamplesToDo);
- MixRowSamples(OutBuffer[i], mInput[i].Gains, mSamples, sNumBands, 0, SamplesToDo);
- }
- ASSUME(OutChannels > InChannels);
- for(ALsizei i{InChannels};i < OutChannels;i++)
- mAllpass[i].process(OutBuffer[i], SamplesToDo);
-}
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h
index 40097f05..29699abf 100644
--- a/Alc/bformatdec.h
+++ b/Alc/bformatdec.h
@@ -32,52 +32,21 @@ class BFormatDec {
std::array<ALfloat,BUFFERSIZE> *mSamplesHF;
std::array<ALfloat,BUFFERSIZE> *mSamplesLF;
- SplitterAllpass mUpAllpass[MAX_OUTPUT_CHANNELS];
- struct {
- BandSplitter Splitter;
- ALfloat Gains[sNumBands];
- } mUpsampler[4];
-
ALsizei mNumChannels;
ALboolean mDualBand;
public:
void reset(const AmbDecConf *conf, bool allow_2band, ALsizei inchans, ALuint srate, const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]);
- void reset(const ALsizei inchans, const ALfloat xover_norm, const ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS]);
+ void reset(const ALsizei inchans, const 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);
- /* Up-samples a first-order input to the decoder's configuration. */
- void upSample(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
-
- DEF_NEWDEL(BFormatDec)
-};
-
-
-/* Stand-alone first-order upsampler. Kept here because it shares some stuff
- * with bformatdec.
- */
-class AmbiUpsampler {
- static constexpr size_t sHFBand{0};
- static constexpr size_t sLFBand{1};
- static constexpr size_t sNumBands{2};
-
- SplitterAllpass mAllpass[MAX_OUTPUT_CHANNELS];
- alignas(16) ALfloat mSamples[sNumBands][BUFFERSIZE];
- struct {
- BandSplitter Splitter;
- ALfloat Gains[sNumBands];
- } mInput[4];
-
-public:
- void reset(const ALsizei out_order, const ALfloat xover_norm);
- void process(ALfloat (*OutBuffer)[BUFFERSIZE], const ALsizei OutChannels, const ALfloat (*InSamples)[BUFFERSIZE], const ALsizei InChannels, const ALsizei SamplesToDo);
-
+ /* Retrieves per-order HF scaling factors for "upsampling" ambisonic data. */
static std::array<ALfloat,MAX_AMBI_ORDER+1> GetHFOrderScales(const ALsizei in_order, const ALsizei out_order) noexcept;
- DEF_NEWDEL(AmbiUpsampler)
+ DEF_NEWDEL(BFormatDec)
};
#endif /* BFORMATDEC_H */
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index 4e230004..3f0aef5c 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -585,7 +585,7 @@ ALboolean ReverbState::deviceUpdate(const ALCdevice *device)
if(device->mAmbiOrder > 1)
{
mMixOut = &ReverbState::MixOutAmbiUp;
- mOrderScales = AmbiUpsampler::GetHFOrderScales(1, device->mAmbiOrder);
+ mOrderScales = BFormatDec::GetHFOrderScales(1, device->mAmbiOrder);
}
else
{
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index dbbad01b..8f6aabc0 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -392,26 +392,6 @@ void InitPanning(ALCdevice *device)
);
device->Dry.NumChannels = count;
- if(device->mAmbiOrder < 2)
- {
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- device->FOAOut.NumChannels = 0;
- }
- else
- {
- device->FOAOut.AmbiMap.fill(BFChannelConfig{});
- std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+4,
- std::begin(device->FOAOut.AmbiMap),
- [](const ALsizei &acn) noexcept { return BFChannelConfig{1.0f, acn}; }
- );
- device->FOAOut.NumChannels = 4;
-
- auto ambiup = al::make_unique<AmbiUpsampler>();
- ambiup->reset(device->mAmbiOrder, 400.0f / static_cast<ALfloat>(device->Frequency));
-
- device->AmbiUp = std::move(ambiup);
- }
-
ALfloat nfc_delay{0.0f};
if(ConfigValueFloat(devname, "decoder", "nfc-ref-delay", &nfc_delay) && nfc_delay > 0.0f)
{
@@ -458,26 +438,7 @@ void InitPanning(ALCdevice *device)
""
);
device->AmbiDecoder = al::make_unique<BFormatDec>();
- device->AmbiDecoder->reset(coeffcount, 400.0f / static_cast<ALfloat>(device->Frequency),
- count, chancoeffs, idxmap);
-
- if(coeffcount <= 3)
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- else
- {
- const std::array<ALfloat,MAX_AMBI_ORDER+1> scales{AmbiUpsampler::GetHFOrderScales(1,
- (coeffcount > 7) ? 4 :
- (coeffcount > 5) ? 3 :
- (coeffcount > 3) ? 2 : 1)};
-
- device->FOAOut.AmbiMap[0] = BFChannelConfig{scales[0], AmbiIndex::From2D[0]};
- auto ambimap_iter = std::transform(AmbiIndex::From2D.begin()+1,
- AmbiIndex::From2D.begin()+3, std::begin(device->FOAOut.AmbiMap)+1,
- [&scales](const ALsizei &acn) noexcept { return BFChannelConfig{scales[1], acn}; }
- );
- std::fill(ambimap_iter, std::end(device->FOAOut.AmbiMap), BFChannelConfig{});
- }
- device->FOAOut.NumChannels = 0;
+ device->AmbiDecoder->reset(coeffcount, count, chancoeffs, idxmap);
device->RealOut.NumChannels = device->channelsFromFmt();
}
@@ -520,36 +481,6 @@ void InitCustomPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei
device->AmbiDecoder = al::make_unique<BFormatDec>();
device->AmbiDecoder->reset(conf, false, count, device->Frequency, speakermap);
- if(conf->ChanMask <= AMBI_1ORDER_MASK)
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- else
- {
- const std::array<ALfloat,MAX_AMBI_ORDER+1> scales{AmbiUpsampler::GetHFOrderScales(1,
- (conf->ChanMask > AMBI_3ORDER_MASK) ? 4 :
- (conf->ChanMask > AMBI_2ORDER_MASK) ? 3 :
- (conf->ChanMask > AMBI_1ORDER_MASK) ? 2 : 1)};
-
- auto ambimap_iter = std::begin(device->FOAOut.AmbiMap);
- if((conf->ChanMask&AMBI_PERIPHONIC_MASK))
- {
- device->FOAOut.AmbiMap[0] = BFChannelConfig{scales[0], AmbiIndex::From3D[0]};
- ambimap_iter = std::transform(AmbiIndex::From3D.begin()+1,
- AmbiIndex::From3D.begin()+4, ambimap_iter+1,
- [&scales](const ALsizei &acn) noexcept { return BFChannelConfig{scales[1], acn}; }
- );
- }
- else
- {
- device->FOAOut.AmbiMap[0] = BFChannelConfig{scales[0], AmbiIndex::From2D[0]};
- ambimap_iter = std::transform(AmbiIndex::From2D.begin()+1,
- AmbiIndex::From2D.begin()+3, ambimap_iter,
- [&scales](const ALsizei &acn) noexcept { return BFChannelConfig{scales[1], acn}; }
- );
- }
- std::fill(ambimap_iter, std::end(device->FOAOut.AmbiMap), BFChannelConfig{});
- }
- device->FOAOut.NumChannels = 0;
-
device->RealOut.NumChannels = device->channelsFromFmt();
InitDistanceComp(device, conf, speakermap);
@@ -592,33 +523,6 @@ void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsizei (&sp
device->AmbiDecoder = al::make_unique<BFormatDec>();
device->AmbiDecoder->reset(conf, true, count, device->Frequency, speakermap);
- if(conf->ChanMask <= AMBI_1ORDER_MASK)
- {
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- device->FOAOut.NumChannels = 0;
- }
- else
- {
- device->FOAOut.AmbiMap.fill(BFChannelConfig{});
- if((conf->ChanMask&AMBI_PERIPHONIC_MASK))
- {
- count = 4;
- std::transform(AmbiIndex::From3D.begin(), AmbiIndex::From3D.begin()+count,
- std::begin(device->FOAOut.AmbiMap),
- [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; }
- );
- }
- else
- {
- count = 3;
- std::transform(AmbiIndex::From2D.begin(), AmbiIndex::From2D.begin()+count,
- std::begin(device->FOAOut.AmbiMap),
- [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; }
- );
- }
- device->FOAOut.NumChannels = count;
- }
-
device->RealOut.NumChannels = device->channelsFromFmt();
using namespace std::placeholders;
@@ -700,16 +604,10 @@ void InitHrtfPanning(ALCdevice *device)
/* Don't bother with HOA when using full HRTF rendering. Nothing needs it,
* and it eases the CPU/memory load.
*/
- std::unique_ptr<AmbiUpsampler> ambiup;
ALsizei ambi_order{1};
if(device->mRenderMode != HrtfRender)
{
ambi_order = 2;
- ambiup = al::make_unique<AmbiUpsampler>();
- ambiup->reset(ambi_order, 400.0f / static_cast<ALfloat>(device->Frequency));
-
- device->AmbiUp = std::move(ambiup);
-
AmbiOrderHFGain = AmbiOrderHFGainHOA;
}
device->mAmbiOrder = ambi_order;
@@ -722,20 +620,6 @@ void InitHrtfPanning(ALCdevice *device)
);
device->Dry.NumChannels = count;
- if(ambi_order > 1)
- {
- device->FOAOut.AmbiMap.fill(BFChannelConfig{});
- std::transform(std::begin(IndexMap), std::begin(IndexMap)+4, std::begin(device->FOAOut.AmbiMap),
- [](const ALsizei &index) noexcept { return BFChannelConfig{1.0f, index}; }
- );
- device->FOAOut.NumChannels = 4;
- }
- else
- {
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- device->FOAOut.NumChannels = 0;
- }
-
device->RealOut.NumChannels = device->channelsFromFmt();
BuildBFormatHrtf(device->mHrtf, device->mHrtfState.get(), device->Dry.NumChannels, AmbiPoints,
@@ -760,9 +644,6 @@ void InitUhjPanning(ALCdevice *device)
);
device->Dry.NumChannels = count;
- device->FOAOut.AmbiMap = device->Dry.AmbiMap;
- device->FOAOut.NumChannels = 0;
-
device->RealOut.NumChannels = device->channelsFromFmt();
}
@@ -897,7 +778,6 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, HrtfRequestMode hrtf_appr
device->ChannelDelay.clear();
device->AmbiDecoder = nullptr;
- device->AmbiUp = nullptr;
device->Stablizer = nullptr;
if(device->FmtChans != DevFmtStereo)