aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-03-28 16:35:42 -0700
committerChris Robinson <[email protected]>2016-03-28 16:35:42 -0700
commitca309e685e88244c3b380acd5eabbc65364665b2 (patch)
tree2eaa31823e503ef6e5f932c593e21998ab4e30e4 /utils
parent34539bc973fc6ee525a4ba21f5653820e62004ae (diff)
Add a config dialog tab for decoder options
Diffstat (limited to 'utils')
-rw-r--r--utils/alsoft-config/mainwindow.cpp67
-rw-r--r--utils/alsoft-config/mainwindow.h10
-rw-r--r--utils/alsoft-config/mainwindow.ui264
3 files changed, 336 insertions, 5 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 5f57ce0f..53e2ffea 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -312,6 +312,19 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->stereoPanningComboBox, 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()));
+ connect(ui->decoderQuadLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->decoderQuadButton, SIGNAL(clicked()), this, SLOT(selectQuadDecoderFile()));
+ connect(ui->decoder51LineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->decoder51Button, SIGNAL(clicked()), this, SLOT(select51DecoderFile()));
+ connect(ui->decoder51RearLineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->decoder51RearButton, SIGNAL(clicked()), this, SLOT(select51RearDecoderFile()));
+ connect(ui->decoder61LineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->decoder61Button, SIGNAL(clicked()), this, SLOT(select71DecoderFile()));
+ connect(ui->decoder71LineEdit, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->decoder71Button, SIGNAL(clicked()), this, SLOT(select61DecoderFile()));
+
connect(ui->preferredHrtfComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(enableApplyButton()));
connect(ui->hrtfStateComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(enableApplyButton()));
connect(ui->hrtfAddButton, SIGNAL(clicked()), this, SLOT(addHrtfFile()));
@@ -610,6 +623,18 @@ void MainWindow::loadConfig(const QString &fname)
}
}
+ bool hqmode = settings.value("decoder/hq-mode", false).toBool();
+ ui->decoderHQModeCheckBox->setChecked(hqmode);
+ bool distcomp = settings.value("decoder/distance-comp", true).toBool();
+ ui->decoderDistCompCheckBox->setChecked(distcomp);
+ ui->decoderDistCompCheckBox->setEnabled(hqmode);
+
+ ui->decoderQuadLineEdit->setText(settings.value("decoder/quad").toString());
+ ui->decoder51LineEdit->setText(settings.value("decoder/surround51").toString());
+ ui->decoder51RearLineEdit->setText(settings.value("decoder/surround51rear").toString());
+ ui->decoder61LineEdit->setText(settings.value("decoder/surround61").toString());
+ ui->decoder71LineEdit->setText(settings.value("decoder/surround71").toString());
+
QStringList disabledCpuExts = settings.value("disable-cpu-exts").toStringList();
if(disabledCpuExts.size() == 1)
disabledCpuExts = disabledCpuExts[0].split(QChar(','));
@@ -826,6 +851,19 @@ 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("decoder/hq-mode",
+ ui->decoderHQModeCheckBox->isChecked() ? QString("true") : QString(/*"false"*/)
+ );
+ settings.setValue("decoder/distance-comp",
+ ui->decoderDistCompCheckBox->isChecked() ? QString(/*"true"*/) : QString("false")
+ );
+
+ settings.setValue("decoder/quad", ui->decoderQuadLineEdit->text());
+ settings.setValue("decoder/surround51", ui->decoder51LineEdit->text());
+ settings.setValue("decoder/surround51rear", ui->decoder51RearLineEdit->text());
+ settings.setValue("decoder/surround61", ui->decoder61LineEdit->text());
+ settings.setValue("decoder/surround71", ui->decoder71LineEdit->text());
+
QStringList strlist;
if(!ui->enableSSECheckBox->isChecked())
strlist.append("sse");
@@ -1035,6 +1073,35 @@ void MainWindow::updatePeriodCountSlider()
}
+void MainWindow::toggleHqState(int state)
+{
+ ui->decoderDistCompCheckBox->setEnabled(state);
+ enableApplyButton();
+}
+
+void MainWindow::selectQuadDecoderFile()
+{ selectDecoderFile(ui->decoderQuadLineEdit, "Select Quadrophonic Decoder");}
+void MainWindow::select51DecoderFile()
+{ selectDecoderFile(ui->decoder51LineEdit, "Select 5.1 Surround (Side) Decoder");}
+void MainWindow::select51RearDecoderFile()
+{ selectDecoderFile(ui->decoder51RearLineEdit, "Select 5.1 Surround (Rear) Decoder");}
+void MainWindow::select61DecoderFile()
+{ selectDecoderFile(ui->decoder61LineEdit, "Select 6.1 Surround Decoder");}
+void MainWindow::select71DecoderFile()
+{ selectDecoderFile(ui->decoder71LineEdit, "Select 7.1 Surround Decoder");}
+void MainWindow::selectDecoderFile(QLineEdit *line, const char *caption)
+{
+ QString fname = QFileDialog::getOpenFileName(this, tr(caption),
+ line->text(), tr("AmbDec Files (*.ambdec);;All Files (*.*)")
+ );
+ if(!fname.isEmpty())
+ {
+ line->setText(fname);
+ enableApplyButton();
+ }
+}
+
+
void MainWindow::updateJackBufferSizeEdit(int size)
{
ui->jackBufferSizeLine->clear();
diff --git a/utils/alsoft-config/mainwindow.h b/utils/alsoft-config/mainwindow.h
index 65e6e1b6..3bf2fb83 100644
--- a/utils/alsoft-config/mainwindow.h
+++ b/utils/alsoft-config/mainwindow.h
@@ -35,6 +35,14 @@ private slots:
void updatePeriodCountEdit(int size);
void updatePeriodCountSlider();
+ void toggleHqState(int state);
+
+ void selectQuadDecoderFile();
+ void select51DecoderFile();
+ void select51RearDecoderFile();
+ void select61DecoderFile();
+ void select71DecoderFile();
+
void updateJackBufferSizeEdit(int size);
void updateJackBufferSizeSlider();
@@ -68,6 +76,8 @@ private:
void closeEvent(QCloseEvent *event);
+ void selectDecoderFile(QLineEdit *line, const char *name);
+
QStringList collectHrtfs();
void loadConfig(const QString &fname);
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 9ed7840a..cb1df954 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -537,6 +537,258 @@ Pair-Wise uses standard pair-wise panning between
</widget>
</widget>
</widget>
+ <widget class="QWidget" name="tab_6">
+ <attribute name="title">
+ <string>Renderer</string>
+ </attribute>
+ <widget class="QCheckBox" name="decoderHQModeCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>181</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Enables high-quality ambisonic rendering. This mode is
+capable of frequency-dependent processing, creating a
+better reproduction of 3D sound rendering over
+surround sound speakers. Enabling this also requires
+specifying decoder configuration files for the
+appropriate speaker configuration you intend to use.</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>High Quality Mode:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="decoderDistCompCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>181</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>This applies the necessary delays and attenuation
+to make the speakers behave as though they are
+all equidistant, which is important for proper
+playback of 3D sound rendering. Requires the high
+quality ambisonic renderer, as well as the proper
+distances to be specified in the decoder
+configuration file.</string>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string>Distance Compensation:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="decoderQuadLineEdit">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>100</y>
+ <width>281</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_25">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>100</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Quadrophonic:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="decoder51LineEdit">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>130</y>
+ <width>281</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="decoder51RearLineEdit">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>160</y>
+ <width>281</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="decoder61LineEdit">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>190</y>
+ <width>281</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="decoder71LineEdit">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>220</y>
+ <width>281</width>
+ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_26">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>130</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>5.1 Surround (Side):</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_27">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>160</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>5.1 Surround (Rear):</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_28">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>190</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>6.1 Surround:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_29">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>220</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>7.1 Surround:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="decoderQuadButton">
+ <property name="geometry">
+ <rect>
+ <x>430</x>
+ <y>100</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="decoder51Button">
+ <property name="geometry">
+ <rect>
+ <x>430</x>
+ <y>130</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="decoder51RearButton">
+ <property name="geometry">
+ <rect>
+ <x>430</x>
+ <y>160</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="decoder61Button">
+ <property name="geometry">
+ <rect>
+ <x>430</x>
+ <y>190</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="decoder71Button">
+ <property name="geometry">
+ <rect>
+ <x>430</x>
+ <y>220</y>
+ <width>91</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Browse...</string>
+ </property>
+ </widget>
+ </widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>HRTF</string>
@@ -1182,7 +1434,7 @@ during updates.</string>
<x>320</x>
<y>30</y>
<width>91</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<property name="text">
@@ -1195,7 +1447,7 @@ during updates.</string>
<x>320</x>
<y>60</y>
<width>91</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<property name="text">
@@ -1239,7 +1491,7 @@ during updates.</string>
<x>320</x>
<y>30</y>
<width>91</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<property name="text">
@@ -1293,7 +1545,7 @@ during updates.</string>
<x>320</x>
<y>30</y>
<width>91</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<property name="text">
@@ -1942,7 +2194,9 @@ added by the ALC_EXT_DEDICATED extension.</string>
<string>Cancel</string>
</property>
<property name="icon">
- <iconset theme="window-close"/>
+ <iconset theme="window-close">
+ <normaloff/>
+ </iconset>
</property>
</widget>
</widget>