Skip to content

Commit f94d8e7

Browse files
committed
Rename surround3d71 to just 3d71
And "3D7.1 Surround" to just "3D7.1". This will hopefully reduce mistaken use of 3D7.1 on normal 7.1 surround sound setups (physical or virtual).
1 parent c886cba commit f94d8e7

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

alc/alc.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,8 @@ auto UpdateDeviceParams(gsl::not_null<al::Device*> device,
11391139
else
11401140
opttype = iter->type;
11411141
}
1142-
if(auto chanopt = device->configValue<std::string>({}, "channels"))
1142+
if(auto const chanopt = device->configValue<std::string>({}, "channels"); chanopt
1143+
&& al::case_compare(*chanopt, "surround3d71"sv) != 0)
11431144
{
11441145
struct ChannelMap {
11451146
std::string_view name;
@@ -1153,14 +1154,14 @@ auto UpdateDeviceParams(gsl::not_null<al::Device*> device,
11531154
ChannelMap{"surround51"sv, DevFmtX51, 0},
11541155
ChannelMap{"surround61"sv, DevFmtX61, 0},
11551156
ChannelMap{"surround71"sv, DevFmtX71, 0},
1156-
ChannelMap{"surround714"sv, DevFmtX714, 0},
1157+
ChannelMap{"3d71"sv, DevFmtX3D71, 0},
1158+
ChannelMap{"surround714"sv, DevFmtX714, 0},
11571159
ChannelMap{"surround7144"sv, DevFmtX7144, 0},
1158-
ChannelMap{"surround3d71"sv, DevFmtX3D71, 0},
1159-
ChannelMap{"surround51rear"sv, DevFmtX51, 0},
11601160
ChannelMap{"ambi1"sv, DevFmtAmbi3D, 1},
11611161
ChannelMap{"ambi2"sv, DevFmtAmbi3D, 2},
11621162
ChannelMap{"ambi3"sv, DevFmtAmbi3D, 3},
11631163
ChannelMap{"ambi4"sv, DevFmtAmbi3D, 4},
1164+
ChannelMap{"surround51rear"sv, DevFmtX51, 0},
11641165
};
11651166

11661167
const auto iter = std::ranges::find_if(chanlist,
@@ -1174,6 +1175,12 @@ auto UpdateDeviceParams(gsl::not_null<al::Device*> device,
11741175
aorder = iter->order;
11751176
}
11761177
}
1178+
else if(chanopt)
1179+
{
1180+
ERR("Channels setting {} is deprecated;", *chanopt);
1181+
ERR(" If you mean 7.1 surround sound, please use \"surround71\"");
1182+
ERR(" Otherwise, if 3D7.1 specifically is set up correctly, please use \"3d71\"");
1183+
}
11771184
if(auto ambiopt = device->configValue<std::string>({}, "ambi-format"sv))
11781185
{
11791186
if(al::case_compare(*ambiopt, "fuma"sv) == 0)

alc/panning.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ void aluInitRenderer(al::Device *device, int hrtf_id, std::optional<StereoEncodi
12191219
case DevFmtX71: layout = "surround71"sv; break;
12201220
case DevFmtX714: layout = "surround714"sv; break;
12211221
case DevFmtX7144: layout = "surround7144"sv; break;
1222-
case DevFmtX3D71: layout = "surround3d71"sv; break;
1222+
case DevFmtX3D71: layout = "3d71"sv; break;
12231223
/* Mono, Stereo, and Ambisonics output don't use custom decoders. */
12241224
case DevFmtMono:
12251225
case DevFmtStereo:
@@ -1233,7 +1233,10 @@ void aluInitRenderer(al::Device *device, int hrtf_id, std::optional<StereoEncodi
12331233
auto usingCustom = false;
12341234
if(!layout.empty())
12351235
{
1236-
if(auto decopt = device->configValue<std::string>("decoder", layout))
1236+
auto decopt = device->configValue<std::string>("decoder", layout);
1237+
if(!decopt && layout == "3d71"sv)
1238+
decopt = device->configValue<std::string>("decoder", "surround3d71");
1239+
if(decopt)
12371240
usingCustom = LoadAmbDecConfig(*decopt, device, decoder_store, decoder,
12381241
speakerdists);
12391242
}

alsoftrc.sample

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
# Sets the default output channel configuration. If left unspecified, one will
5757
# try to be detected from the system, with a fallback to stereo. The available
5858
# values are: mono, stereo, quad, surround51, surround61, surround71,
59-
# surround714, surround3d71, ambi1, ambi2, ambi3, ambi4. Note that the ambi*
59+
# surround714, 3d71, ambi1, ambi2, ambi3, ambi4. Note that the ambi*
6060
# configurations output ambisonic channels of the given order (using ACN
6161
# ordering and SN3D normalization by default), which need to be decoded to
6262
# play correctly on speakers.
@@ -353,11 +353,11 @@
353353
# docs/ambdec.txt for a description of the file format.
354354
#surround714 =
355355

356-
## surround3d71:
357-
# Decoder configuration file for 3D7.1 Surround channel output. See
358-
# docs/ambdec.txt for a description of the file format. See also
359-
# docs/3D7.1.txt for information about 3D7.1.
360-
#surround3d71 =
356+
## 3d71:
357+
# Decoder configuration file for 3D7.1 channel output. See docs/ambdec.txt for
358+
# a description of the file format. See also docs/3D7.1.txt for information
359+
# about 3D7.1.
360+
#3d71 =
361361

362362
##
363363
## UHJ and Super Stereo stuff

utils/alsoft-config/mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const auto speakerModeList = std::array{
9393
NameValuePair{ QStringLiteral("5.1 Surround"), QStringLiteral("surround51") },
9494
NameValuePair{ QStringLiteral("6.1 Surround"), QStringLiteral("surround61") },
9595
NameValuePair{ QStringLiteral("7.1 Surround"), QStringLiteral("surround71") },
96-
NameValuePair{ QStringLiteral("3D7.1 Surround"), QStringLiteral("surround3d71") },
96+
NameValuePair{ QStringLiteral("3D7.1"), QStringLiteral("3d71") },
9797

9898
NameValuePair{ QStringLiteral("Ambisonic, 1st Order"), QStringLiteral("ambi1") },
9999
NameValuePair{ QStringLiteral("Ambisonic, 2nd Order"), QStringLiteral("ambi2") },
@@ -760,7 +760,7 @@ void MainWindow::loadConfig(const QString &fname)
760760
ui->decoder51LineEdit->setText(settings.value(QStringLiteral("decoder/surround51")).toString());
761761
ui->decoder61LineEdit->setText(settings.value(QStringLiteral("decoder/surround61")).toString());
762762
ui->decoder71LineEdit->setText(settings.value(QStringLiteral("decoder/surround71")).toString());
763-
ui->decoder3D71LineEdit->setText(settings.value(QStringLiteral("decoder/surround3d71")).toString());
763+
ui->decoder3D71LineEdit->setText(settings.value(QStringLiteral("decoder/3d71")).toString());
764764

765765
QStringList disabledCpuExts{settings.value(QStringLiteral("disable-cpu-exts")).toStringList()};
766766
if(disabledCpuExts.size() == 1)
@@ -1021,7 +1021,7 @@ void MainWindow::saveConfig(const QString &fname) const
10211021
settings.setValue(QStringLiteral("decoder/surround51"), ui->decoder51LineEdit->text());
10221022
settings.setValue(QStringLiteral("decoder/surround61"), ui->decoder61LineEdit->text());
10231023
settings.setValue(QStringLiteral("decoder/surround71"), ui->decoder71LineEdit->text());
1024-
settings.setValue(QStringLiteral("decoder/surround3d71"), ui->decoder3D71LineEdit->text());
1024+
settings.setValue(QStringLiteral("decoder/3d71"), ui->decoder3D71LineEdit->text());
10251025

10261026
QStringList strlist;
10271027
if(!ui->enableSSECheckBox->isChecked())

utils/alsoft-config/mainwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ configuration file.</string>
845845
</rect>
846846
</property>
847847
<property name="text">
848-
<string>3D7.1 Surround:</string>
848+
<string>3D7.1:</string>
849849
</property>
850850
<property name="alignment">
851851
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

0 commit comments

Comments
 (0)