aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
{