aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-07-31 08:03:26 -0700
committerChris Robinson <[email protected]>2016-07-31 08:03:26 -0700
commit2dd27568903033dfb017aaa85b53c6fa4abfd0de (patch)
treee20387a3d4dfa9c5f38718579c6d6e8f3068a482
parent4bcd2fbb2e79419c9b0973b7587df47d20004a5f (diff)
Handle ambi-format with alsoft-config
-rw-r--r--utils/alsoft-config/mainwindow.cpp24
-rw-r--r--utils/alsoft-config/mainwindow.ui23
2 files changed, 47 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index c5fd0a2d..80fbdf80 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -115,6 +115,13 @@ static const struct NameValuePair {
{ "Pair-Wise", "paired" },
{ "", "" }
+}, ambiFormatList[] = {
+ { "Default", "" },
+ { "ACN + SN3D", "acn+sn3d" },
+ { "ACN + N3D", "acn+n3d" },
+ { "Furse-Malham", "fuma" },
+
+ { "", "" }
};
static QString getDefaultConfigName()
@@ -229,6 +236,9 @@ MainWindow::MainWindow(QWidget *parent) :
for(int i = 0;stereoPanList[i].name[0];i++)
ui->stereoPanningComboBox->addItem(stereoPanList[i].name);
ui->stereoPanningComboBox->adjustSize();
+ for(int i = 0;ambiFormatList[i].name[0];i++)
+ ui->ambiFormatComboBox->addItem(ambiFormatList[i].name);
+ ui->ambiFormatComboBox->adjustSize();
int count;
for(count = 0;resamplerList[count].name[0];count++) {
@@ -316,6 +326,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->periodCountEdit, SIGNAL(editingFinished()), this, SLOT(updatePeriodCountSlider()));
connect(ui->stereoPanningComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->ambiFormatComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton()));
connect(ui->decoderHQModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(toggleHqState(int)));
connect(ui->decoderDistCompCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
@@ -628,6 +639,18 @@ void MainWindow::loadConfig(const QString &fname)
}
}
+ QString ambiformat = settings.value("ambi-format").toString();
+ ui->ambiFormatComboBox->setCurrentIndex(0);
+ if(ambiformat.isEmpty() == false)
+ {
+ QString str = getNameFromValue(ambiFormatList, ambiformat);
+ if(!str.isEmpty())
+ {
+ int j = ui->ambiFormatComboBox->findText(str);
+ if(j > 0) ui->ambiFormatComboBox->setCurrentIndex(j);
+ }
+ }
+
bool hqmode = settings.value("decoder/hq-mode", false).toBool();
ui->decoderHQModeCheckBox->setChecked(hqmode);
bool distcomp = settings.value("decoder/distance-comp", true).toBool();
@@ -855,6 +878,7 @@ void MainWindow::saveConfig(const QString &fname) const
settings.setValue("stereo-mode", getValueFromName(stereoModeList, ui->stereoModeCombo->currentText()));
settings.setValue("stereo-panning", getValueFromName(stereoPanList, ui->stereoPanningComboBox->currentText()));
+ settings.setValue("ambi-format", getValueFromName(ambiFormatList, ui->ambiFormatComboBox->currentText()));
settings.setValue("decoder/hq-mode",
ui->decoderHQModeCheckBox->isChecked() ? QString("true") : QString(/*"false"*/)
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 0606d08c..0356d491 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -461,6 +461,29 @@ Pair-Wise uses standard pair-wise panning between
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
+ <widget class="QLabel" name="label_30">
+ <property name="geometry">
+ <rect>
+ <x>270</x>
+ <y>130</y>
+ <width>111</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Ambisonic Format:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="ambiFormatComboBox">
+ <property name="geometry">
+ <rect>
+ <x>390</x>
+ <y>130</y>
+ <width>131</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
</widget>
<widget class="QGroupBox" name="groupBox_4">
<property name="geometry">