aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp4
-rw-r--r--alc/backends/base.cpp74
-rw-r--r--alc/backends/base.h5
-rw-r--r--alc/backends/coreaudio.cpp1
-rw-r--r--alc/backends/dsound.cpp6
-rw-r--r--alc/backends/oboe.cpp1
-rw-r--r--alc/backends/opensl.cpp3
-rw-r--r--alc/backends/pipewire.cpp1
-rw-r--r--alc/backends/pulseaudio.cpp2
-rw-r--r--alc/backends/wasapi.cpp6
-rw-r--r--alc/backends/wave.cpp2
-rw-r--r--alc/backends/winmm.cpp10
-rw-r--r--alc/context.cpp4
-rw-r--r--alc/device.cpp1
-rw-r--r--alc/panning.cpp58
15 files changed, 103 insertions, 75 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 3bbe43d0..686b794e 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1441,6 +1441,8 @@ ALCenum EnumFromDevFmt(DevFmtChannels channels)
case DevFmtX61: return ALC_6POINT1_SOFT;
case DevFmtX71: return ALC_7POINT1_SOFT;
case DevFmtAmbi3D: return ALC_BFORMAT3D_SOFT;
+ /* FIXME: Shouldn't happen. */
+ case DevFmtX3D71: break;
}
throw std::runtime_error{"Invalid DevFmtChannels: "+std::to_string(int(channels))};
}
@@ -1911,6 +1913,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
{ "surround51", DevFmtX51, 0 },
{ "surround61", DevFmtX61, 0 },
{ "surround71", DevFmtX71, 0 },
+ { "surround3d71", DevFmtX3D71, 0 },
{ "surround51rear", DevFmtX51, 0 },
{ "ambi1", DevFmtAmbi3D, 1 },
{ "ambi2", DevFmtAmbi3D, 2 },
@@ -2090,6 +2093,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
case DevFmtX51: device->RealOut.RemixMap = X51Downmix; break;
case DevFmtX61: device->RealOut.RemixMap = X61Downmix; break;
case DevFmtX71: device->RealOut.RemixMap = X71Downmix; break;
+ case DevFmtX3D71: device->RealOut.RemixMap = X51Downmix; break;
case DevFmtAmbi3D: break;
}
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp
index cd1b76ba..4abd7c03 100644
--- a/alc/backends/base.cpp
+++ b/alc/backends/base.cpp
@@ -98,6 +98,16 @@ void BackendBase::setDefaultWFXChannelOrder()
mDevice->RealOut.ChannelIndex[SideLeft] = 6;
mDevice->RealOut.ChannelIndex[SideRight] = 7;
break;
+ case DevFmtX3D71:
+ mDevice->RealOut.ChannelIndex[FrontLeft] = 0;
+ mDevice->RealOut.ChannelIndex[FrontRight] = 1;
+ mDevice->RealOut.ChannelIndex[FrontCenter] = 2;
+ mDevice->RealOut.ChannelIndex[LFE] = 3;
+ mDevice->RealOut.ChannelIndex[Aux0] = 4;
+ mDevice->RealOut.ChannelIndex[Aux1] = 5;
+ mDevice->RealOut.ChannelIndex[SideLeft] = 6;
+ mDevice->RealOut.ChannelIndex[SideRight] = 7;
+ break;
case DevFmtAmbi3D:
break;
}
@@ -127,6 +137,16 @@ void BackendBase::setDefaultChannelOrder()
mDevice->RealOut.ChannelIndex[SideLeft] = 6;
mDevice->RealOut.ChannelIndex[SideRight] = 7;
return;
+ case DevFmtX3D71:
+ mDevice->RealOut.ChannelIndex[FrontLeft] = 0;
+ mDevice->RealOut.ChannelIndex[FrontRight] = 1;
+ mDevice->RealOut.ChannelIndex[Aux0] = 2;
+ mDevice->RealOut.ChannelIndex[Aux1] = 3;
+ mDevice->RealOut.ChannelIndex[FrontCenter] = 4;
+ mDevice->RealOut.ChannelIndex[LFE] = 5;
+ mDevice->RealOut.ChannelIndex[SideLeft] = 6;
+ mDevice->RealOut.ChannelIndex[SideRight] = 7;
+ return;
/* Same as WFX order */
case DevFmtMono:
@@ -138,57 +158,3 @@ void BackendBase::setDefaultChannelOrder()
break;
}
}
-
-#ifdef _WIN32
-void BackendBase::setChannelOrderFromWFXMask(uint chanmask)
-{
- static constexpr uint x51{SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER
- | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT};
- static constexpr uint x51rear{SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER
- | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT};
- /* Swap a 5.1 mask using the back channels for one with the sides. */
- if(chanmask == x51rear) chanmask = x51;
-
- auto get_channel = [](const DWORD chanbit) noexcept -> al::optional<Channel>
- {
- switch(chanbit)
- {
- case SPEAKER_FRONT_LEFT: return al::make_optional(FrontLeft);
- case SPEAKER_FRONT_RIGHT: return al::make_optional(FrontRight);
- case SPEAKER_FRONT_CENTER: return al::make_optional(FrontCenter);
- case SPEAKER_LOW_FREQUENCY: return al::make_optional(LFE);
- case SPEAKER_BACK_LEFT: return al::make_optional(BackLeft);
- case SPEAKER_BACK_RIGHT: return al::make_optional(BackRight);
- case SPEAKER_FRONT_LEFT_OF_CENTER: break;
- case SPEAKER_FRONT_RIGHT_OF_CENTER: break;
- case SPEAKER_BACK_CENTER: return al::make_optional(BackCenter);
- case SPEAKER_SIDE_LEFT: return al::make_optional(SideLeft);
- case SPEAKER_SIDE_RIGHT: return al::make_optional(SideRight);
- case SPEAKER_TOP_CENTER: return al::make_optional(TopCenter);
- case SPEAKER_TOP_FRONT_LEFT: return al::make_optional(TopFrontLeft);
- case SPEAKER_TOP_FRONT_CENTER: return al::make_optional(TopFrontCenter);
- case SPEAKER_TOP_FRONT_RIGHT: return al::make_optional(TopFrontRight);
- case SPEAKER_TOP_BACK_LEFT: return al::make_optional(TopBackLeft);
- case SPEAKER_TOP_BACK_CENTER: return al::make_optional(TopBackCenter);
- case SPEAKER_TOP_BACK_RIGHT: return al::make_optional(TopBackRight);
- }
- WARN("Unhandled WFX channel bit 0x%lx\n", chanbit);
- return al::nullopt;
- };
-
- const uint numchans{mDevice->channelsFromFmt()};
- uint idx{0};
- while(chanmask)
- {
- const int bit{al::countr_zero(chanmask)};
- const uint mask{1u << bit};
- chanmask &= ~mask;
-
- if(auto label = get_channel(mask))
- {
- mDevice->RealOut.ChannelIndex[*label] = idx;
- if(++idx == numchans) break;
- }
- }
-}
-#endif
diff --git a/alc/backends/base.h b/alc/backends/base.h
index a3562f54..65bc636b 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -41,11 +41,6 @@ protected:
void setDefaultChannelOrder();
/** Sets the default channel order used by WaveFormatEx. */
void setDefaultWFXChannelOrder();
-
-#ifdef _WIN32
- /** Sets the channel order given the WaveFormatEx mask. */
- void setChannelOrderFromWFXMask(uint chanmask);
-#endif
};
using BackendPtr = std::unique_ptr<BackendBase>;
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index ed85e2a9..b81bd58a 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -764,6 +764,7 @@ void CoreAudioCapture::open(const char *name)
case DevFmtX51:
case DevFmtX61:
case DevFmtX71:
+ case DevFmtX3D71:
case DevFmtAmbi3D:
throw al::backend_exception{al::backend_error::DeviceError, "%s not supported",
DevFmtChannelsString(mDevice->FmtChans)};
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index 0edc286f..36c4cd78 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -421,6 +421,7 @@ bool DSoundPlayback::reset()
case DevFmtX51: OutputType.dwChannelMask = X5DOT1; break;
case DevFmtX61: OutputType.dwChannelMask = X6DOT1; break;
case DevFmtX71: OutputType.dwChannelMask = X7DOT1; break;
+ case DevFmtX3D71: OutputType.dwChannelMask = X7DOT1; break;
}
retry_open:
@@ -514,7 +515,7 @@ retry_open:
}
ResetEvent(mNotifyEvent);
- setChannelOrderFromWFXMask(OutputType.dwChannelMask);
+ setDefaultWFXChannelOrder();
return true;
}
@@ -635,6 +636,7 @@ void DSoundCapture::open(const char *name)
case DevFmtX51: InputType.dwChannelMask = X5DOT1; break;
case DevFmtX61: InputType.dwChannelMask = X6DOT1; break;
case DevFmtX71: InputType.dwChannelMask = X7DOT1; break;
+ case DevFmtX3D71:
case DevFmtAmbi3D:
WARN("%s capture not supported\n", DevFmtChannelsString(mDevice->FmtChans));
throw al::backend_exception{al::backend_error::DeviceError, "%s capture not supported",
@@ -689,7 +691,7 @@ void DSoundCapture::open(const char *name)
}
mBufferBytes = DSCBDescription.dwBufferBytes;
- setChannelOrderFromWFXMask(InputType.dwChannelMask);
+ setDefaultWFXChannelOrder();
mDevice->DeviceName = name;
}
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index 38f048cb..03930ad8 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -234,6 +234,7 @@ void OboeCapture::open(const char *name)
case DevFmtX51:
case DevFmtX61:
case DevFmtX71:
+ case DevFmtX3D71:
case DevFmtAmbi3D:
throw al::backend_exception{al::backend_error::DeviceError, "%s capture not supported",
DevFmtChannelsString(mDevice->FmtChans)};
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 85a5f483..76b2095e 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -71,7 +71,8 @@ constexpr SLuint32 GetChannelMask(DevFmtChannels chans) noexcept
case DevFmtX61: return SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT |
SL_SPEAKER_FRONT_CENTER | SL_SPEAKER_LOW_FREQUENCY | SL_SPEAKER_BACK_CENTER |
SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT;
- case DevFmtX71: return SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT |
+ case DevFmtX71:
+ case DevFmtX3D71: return SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT |
SL_SPEAKER_FRONT_CENTER | SL_SPEAKER_LOW_FREQUENCY | SL_SPEAKER_BACK_LEFT |
SL_SPEAKER_BACK_RIGHT | SL_SPEAKER_SIDE_LEFT | SL_SPEAKER_SIDE_RIGHT;
case DevFmtAmbi3D:
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index a19dcb61..95845158 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1181,6 +1181,7 @@ spa_audio_info_raw make_spa_info(DeviceBase *device, bool is51rear, use_f32p_e u
break;
case DevFmtX61: map = X61Map; break;
case DevFmtX71: map = X71Map; break;
+ case DevFmtX3D71: map = X71Map; break;
case DevFmtAmbi3D:
info.flags |= SPA_AUDIO_FLAG_UNPOSITIONED;
info.channels = device->channelsFromFmt();
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 67e00234..30f486c7 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -893,6 +893,7 @@ bool PulsePlayback::reset()
chanmap = X61ChanMap;
break;
case DevFmtX71:
+ case DevFmtX3D71:
chanmap = X71ChanMap;
break;
}
@@ -1173,6 +1174,7 @@ void PulseCapture::open(const char *name)
case DevFmtX71:
chanmap = X71ChanMap;
break;
+ case DevFmtX3D71:
case DevFmtAmbi3D:
throw al::backend_exception{al::backend_error::DeviceError, "%s capture not supported",
DevFmtChannelsString(mDevice->FmtChans)};
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 063fca98..4e0f67a2 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -926,6 +926,7 @@ HRESULT WasapiPlayback::resetProxy()
OutputType.dwChannelMask = X6DOT1;
break;
case DevFmtX71:
+ case DevFmtX3D71:
OutputType.Format.nChannels = 8;
OutputType.dwChannelMask = X7DOT1;
break;
@@ -1021,6 +1022,7 @@ HRESULT WasapiPlayback::resetProxy()
chansok = (chancount >= 7 && (chanmask&X61Mask) == X6DOT1);
break;
case DevFmtX71:
+ case DevFmtX3D71:
chansok = (chancount >= 8 && (chanmask&X71Mask) == X7DOT1);
break;
case DevFmtAmbi3D:
@@ -1087,7 +1089,7 @@ HRESULT WasapiPlayback::resetProxy()
const EndpointFormFactor formfactor{get_device_formfactor(mMMDev.get())};
mDevice->Flags.set(DirectEar, (formfactor == Headphones || formfactor == Headset));
- setChannelOrderFromWFXMask(OutputType.dwChannelMask);
+ setDefaultWFXChannelOrder();
hr = mClient->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
buf_time.count(), 0, &OutputType.Format, nullptr);
@@ -1476,6 +1478,7 @@ HRESULT WasapiCapture::resetProxy()
InputType.dwChannelMask = X7DOT1;
break;
+ case DevFmtX3D71:
case DevFmtAmbi3D:
return E_FAIL;
}
@@ -1556,6 +1559,7 @@ HRESULT WasapiCapture::resetProxy()
case DevFmtX61:
return (chancount == 7 && (chanmask == 0 || (chanmask&X61Mask) == X6DOT1));
case DevFmtX71:
+ case DevFmtX3D71:
return (chancount == 8 && (chanmask == 0 || (chanmask&X71Mask) == X7DOT1));
case DevFmtAmbi3D:
return (chanmask == 0 && chancount == device->channelsFromFmt());
diff --git a/alc/backends/wave.cpp b/alc/backends/wave.cpp
index 6360166c..80e93f69 100644
--- a/alc/backends/wave.cpp
+++ b/alc/backends/wave.cpp
@@ -265,6 +265,8 @@ bool WaveBackend::reset()
case DevFmtX51: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x200 | 0x400; break;
case DevFmtX61: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x100 | 0x200 | 0x400; break;
case DevFmtX71: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020 | 0x200 | 0x400; break;
+ /* NOTE: Same as 7.1. */
+ case DevFmtX3D71: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020 | 0x200 | 0x400; break;
case DevFmtAmbi3D:
/* .amb output requires FuMa */
mDevice->mAmbiOrder = minu(mDevice->mAmbiOrder, 3);
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index 0fdd8a02..14cc4f9e 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -301,23 +301,16 @@ bool WinMMPlayback::reset()
return false;
}
- uint chanmask{};
if(mFormat.nChannels >= 2)
- {
mDevice->FmtChans = DevFmtStereo;
- chanmask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
- }
else if(mFormat.nChannels == 1)
- {
mDevice->FmtChans = DevFmtMono;
- chanmask = SPEAKER_FRONT_CENTER;
- }
else
{
ERR("Unhandled channel count: %d\n", mFormat.nChannels);
return false;
}
- setChannelOrderFromWFXMask(chanmask);
+ setDefaultWFXChannelOrder();
uint BufferSize{mDevice->UpdateSize * mFormat.nChannels * mDevice->bytesFromFmt()};
@@ -476,6 +469,7 @@ void WinMMCapture::open(const char *name)
case DevFmtX51:
case DevFmtX61:
case DevFmtX71:
+ case DevFmtX3D71:
case DevFmtAmbi3D:
throw al::backend_exception{al::backend_error::DeviceError, "%s capture not supported",
DevFmtChannelsString(mDevice->FmtChans)};
diff --git a/alc/context.cpp b/alc/context.cpp
index 456c054e..34da3784 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -558,6 +558,10 @@ unsigned long ALCcontext::eax_detect_speaker_configuration() const
case DevFmtX51: return SPEAKERS_5;
case DevFmtX61: return SPEAKERS_6;
case DevFmtX71: return SPEAKERS_7;
+ /* 3D7.1 is only compatible with 5.1. This could instead be HEADPHONES to
+ * suggest full-sphere surround sound (like HRTF).
+ */
+ case DevFmtX3D71: return SPEAKERS_5;
/* This could also be HEADPHONES, since headphones-based HRTF and Ambi3D
* provide full-sphere surround sound. Depends if apps are more likely to
* consider headphones or 7.1 for surround sound support.
diff --git a/alc/device.cpp b/alc/device.cpp
index e06c0d74..6eeb907e 100644
--- a/alc/device.cpp
+++ b/alc/device.cpp
@@ -84,6 +84,7 @@ auto ALCdevice::getOutputMode1() const noexcept -> OutputMode1
case DevFmtX51: return OutputMode1::X51;
case DevFmtX61: return OutputMode1::X61;
case DevFmtX71: return OutputMode1::X71;
+ case DevFmtX3D71:
case DevFmtAmbi3D: break;
}
return OutputMode1::Any;
diff --git a/alc/panning.cpp b/alc/panning.cpp
index 00bf5662..d0afd577 100644
--- a/alc/panning.cpp
+++ b/alc/panning.cpp
@@ -89,6 +89,23 @@ inline const char *GetLabelFromChannel(Channel channel)
case TopBackCenter: return "top-back-center";
case TopBackRight: return "top-back-right";
+ case Aux0: return "Aux0";
+ case Aux1: return "Aux1";
+ case Aux2: return "Aux2";
+ case Aux3: return "Aux3";
+ case Aux4: return "Aux4";
+ case Aux5: return "Aux5";
+ case Aux6: return "Aux6";
+ case Aux7: return "Aux7";
+ case Aux8: return "Aux8";
+ case Aux9: return "Aux9";
+ case Aux10: return "Aux10";
+ case Aux11: return "Aux11";
+ case Aux12: return "Aux12";
+ case Aux13: return "Aux13";
+ case Aux14: return "Aux14";
+ case Aux15: return "Aux15";
+
case MaxChannels: break;
}
return "(unknown)";
@@ -202,6 +219,8 @@ struct DecoderConfig<DualBand, 0> {
mCoeffsLF = rhs.mCoeffsLF;
return *this;
}
+
+ explicit operator bool() const noexcept { return mOrder != 0; }
};
using DecoderView = DecoderConfig<DualBand, 0>;
@@ -412,8 +431,15 @@ DecoderView MakeDecoderView(ALCdevice *device, const AmbDecConf *conf,
ch = BackCenter;
else
{
- ERR("AmbDec speaker label \"%s\" not recognized\n", speaker.Name.c_str());
- continue;
+ int idx{};
+ char c{};
+ if(sscanf(speaker.Name.c_str(), "AUX%d%c", &idx, &c) != 1 || idx < 0
+ || idx >= MaxChannels-Aux0)
+ {
+ ERR("AmbDec speaker label \"%s\" not recognized\n", speaker.Name.c_str());
+ continue;
+ }
+ ch = static_cast<Channel>(Aux0+idx);
}
decoder.mChannels[chan_count] = ch;
@@ -537,11 +563,33 @@ constexpr DecoderConfig<DualBand, 6> X71Config{
{{1.66666667e-1f, -9.62250449e-2f, -1.66666667e-1f, 1.49071198e-1f, 8.60662966e-2f, -7.96819073e-2f, 0.00000000e+0f}},
}}
};
+constexpr DecoderConfig<DualBand, 6> X3D71Config{
+ 1, true, {{Aux0, SideLeft, FrontLeft, FrontRight, SideRight, Aux1}},
+ DevAmbiScaling::N3D,
+ /*HF*/{{1.73205081e+0f, 1.00000000e+0f}},
+ {{
+ {{1.66669447e-1f, 0.00000000e+0f, 2.36070520e-1f, -1.66153012e-1f}},
+ {{1.66669447e-1f, 2.04127551e-1f, -1.17487922e-1f, -1.66927066e-1f}},
+ {{1.66669447e-1f, 2.04127551e-1f, 1.17487922e-1f, 1.66927066e-1f}},
+ {{1.66669447e-1f, -2.04127551e-1f, 1.17487922e-1f, 1.66927066e-1f}},
+ {{1.66669447e-1f, -2.04127551e-1f, -1.17487922e-1f, -1.66927066e-1f}},
+ {{1.66669447e-1f, 0.00000000e+0f, -2.36070520e-1f, 1.66153012e-1f}},
+ }},
+ /*LF*/{{1.00000000e+0f, 1.00000000e+0f}},
+ {{
+ {{1.66669447e-1f, 0.00000000e+0f, 2.36070520e-1f, -1.66153012e-1f}},
+ {{1.66669447e-1f, 2.04127551e-1f, -1.17487922e-1f, -1.66927066e-1f}},
+ {{1.66669447e-1f, 2.04127551e-1f, 1.17487922e-1f, 1.66927066e-1f}},
+ {{1.66669447e-1f, -2.04127551e-1f, 1.17487922e-1f, 1.66927066e-1f}},
+ {{1.66669447e-1f, -2.04127551e-1f, -1.17487922e-1f, -1.66927066e-1f}},
+ {{1.66669447e-1f, 0.00000000e+0f, -2.36070520e-1f, 1.66153012e-1f}},
+ }}
+};
void InitPanning(ALCdevice *device, const bool hqdec=false, const bool stablize=false,
DecoderView decoder={})
{
- if(!decoder.mOrder)
+ if(!decoder)
{
switch(device->FmtChans)
{
@@ -551,6 +599,7 @@ void InitPanning(ALCdevice *device, const bool hqdec=false, const bool stablize=
case DevFmtX51: decoder = X51Config; break;
case DevFmtX61: decoder = X61Config; break;
case DevFmtX71: decoder = X71Config; break;
+ case DevFmtX3D71: decoder = X3D71Config; break;
case DevFmtAmbi3D:
auto&& acnmap = GetAmbiLayout(device->mAmbiLayout);
auto&& n3dscale = GetAmbiScales(device->mAmbiScale);
@@ -906,6 +955,7 @@ void aluInitRenderer(ALCdevice *device, int hrtf_id, al::optional<StereoEncoding
case DevFmtX51: layout = "surround51"; break;
case DevFmtX61: layout = "surround61"; break;
case DevFmtX71: layout = "surround71"; break;
+ case DevFmtX3D71: layout = "surround3d71"; break;
/* Mono, Stereo, and Ambisonics output don't use custom decoders. */
case DevFmtMono:
case DevFmtStereo:
@@ -915,7 +965,7 @@ void aluInitRenderer(ALCdevice *device, int hrtf_id, al::optional<StereoEncoding
std::unique_ptr<DecoderConfig<DualBand,MAX_OUTPUT_CHANNELS>> decoder_store;
DecoderView decoder{};
- float speakerdists[MaxChannels]{};
+ float speakerdists[MAX_OUTPUT_CHANNELS]{};
auto load_config = [device,&decoder_store,&decoder,&speakerdists](const char *config)
{
AmbDecConf conf{};