aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-01-05 22:31:13 -0800
committerChris Robinson <[email protected]>2019-01-05 22:31:13 -0800
commit3b91010e21f607196a3927f617164c4fdb68b5e6 (patch)
tree182d2fec05cffa36b28b748d7ec9b5fd6728a1c4
parentaa29bf593342643906514fc4497a4428ec1828ab (diff)
Pass the normalized crossover frequency to the reset method
-rw-r--r--Alc/bformatdec.cpp4
-rw-r--r--Alc/bformatdec.h2
-rw-r--r--Alc/panning.cpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp
index a7cce89c..0e67b20a 100644
--- a/Alc/bformatdec.cpp
+++ b/Alc/bformatdec.cpp
@@ -146,7 +146,7 @@ void BFormatDec::reset(const AmbDecConf *conf, bool allow_2band, ALsizei inchans
}
}
-void BFormatDec::reset(ALsizei inchans, ALuint srate, ALsizei chancount, const ChannelDec (&chancoeffs)[MAX_OUTPUT_CHANNELS], const ALsizei (&chanmap)[MAX_OUTPUT_CHANNELS])
+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])
{
mSamples.clear();
mSamplesHF = nullptr;
@@ -162,8 +162,6 @@ void BFormatDec::reset(ALsizei inchans, ALuint srate, ALsizei chancount, const C
{ return mask | (1 << chan); }
);
- const ALfloat xover_norm{400.0f / (float)srate};
-
const ALsizei out_order{
(inchans > 7) ? 4 :
(inchans > 5) ? 3 :
diff --git a/Alc/bformatdec.h b/Alc/bformatdec.h
index ea9c7317..153882c4 100644
--- a/Alc/bformatdec.h
+++ b/Alc/bformatdec.h
@@ -42,7 +42,7 @@ private:
public:
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]);
+ void reset(const ALsizei inchans, const ALfloat xover_norm, 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);
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index a89e0493..8de52308 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -450,7 +450,8 @@ void InitPanning(ALCdevice *device)
""
);
device->AmbiDecoder.reset(new BFormatDec{});
- device->AmbiDecoder->reset(coeffcount, device->Frequency, count, chancoeffs, idxmap);
+ device->AmbiDecoder->reset(coeffcount, 400.0f / static_cast<ALfloat>(device->Frequency),
+ count, chancoeffs, idxmap);
if(coeffcount <= 4)
{