Add a config dialog tab for decoder options
This commit is contained in:
parent
34539bc973
commit
ca309e685e
@ -312,6 +312,19 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
connect(ui->stereoPanningComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton()));
|
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->preferredHrtfComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(enableApplyButton()));
|
||||||
connect(ui->hrtfStateComboBox, 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()));
|
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();
|
QStringList disabledCpuExts = settings.value("disable-cpu-exts").toStringList();
|
||||||
if(disabledCpuExts.size() == 1)
|
if(disabledCpuExts.size() == 1)
|
||||||
disabledCpuExts = disabledCpuExts[0].split(QChar(','));
|
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-mode", getValueFromName(stereoModeList, ui->stereoModeCombo->currentText()));
|
||||||
settings.setValue("stereo-panning", getValueFromName(stereoPanList, ui->stereoPanningComboBox->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;
|
QStringList strlist;
|
||||||
if(!ui->enableSSECheckBox->isChecked())
|
if(!ui->enableSSECheckBox->isChecked())
|
||||||
strlist.append("sse");
|
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)
|
void MainWindow::updateJackBufferSizeEdit(int size)
|
||||||
{
|
{
|
||||||
ui->jackBufferSizeLine->clear();
|
ui->jackBufferSizeLine->clear();
|
||||||
|
@ -35,6 +35,14 @@ private slots:
|
|||||||
void updatePeriodCountEdit(int size);
|
void updatePeriodCountEdit(int size);
|
||||||
void updatePeriodCountSlider();
|
void updatePeriodCountSlider();
|
||||||
|
|
||||||
|
void toggleHqState(int state);
|
||||||
|
|
||||||
|
void selectQuadDecoderFile();
|
||||||
|
void select51DecoderFile();
|
||||||
|
void select51RearDecoderFile();
|
||||||
|
void select61DecoderFile();
|
||||||
|
void select71DecoderFile();
|
||||||
|
|
||||||
void updateJackBufferSizeEdit(int size);
|
void updateJackBufferSizeEdit(int size);
|
||||||
void updateJackBufferSizeSlider();
|
void updateJackBufferSizeSlider();
|
||||||
|
|
||||||
@ -68,6 +76,8 @@ private:
|
|||||||
|
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
|
void selectDecoderFile(QLineEdit *line, const char *name);
|
||||||
|
|
||||||
QStringList collectHrtfs();
|
QStringList collectHrtfs();
|
||||||
|
|
||||||
void loadConfig(const QString &fname);
|
void loadConfig(const QString &fname);
|
||||||
|
@ -537,6 +537,258 @@ Pair-Wise uses standard pair-wise panning between
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</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">
|
<widget class="QWidget" name="tab_5">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>HRTF</string>
|
<string>HRTF</string>
|
||||||
@ -1182,7 +1434,7 @@ during updates.</string>
|
|||||||
<x>320</x>
|
<x>320</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -1195,7 +1447,7 @@ during updates.</string>
|
|||||||
<x>320</x>
|
<x>320</x>
|
||||||
<y>60</y>
|
<y>60</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -1239,7 +1491,7 @@ during updates.</string>
|
|||||||
<x>320</x>
|
<x>320</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -1293,7 +1545,7 @@ during updates.</string>
|
|||||||
<x>320</x>
|
<x>320</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>91</width>
|
<width>91</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -1942,7 +2194,9 @@ added by the ALC_EXT_DEDICATED extension.</string>
|
|||||||
<string>Cancel</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="window-close"/>
|
<iconset theme="window-close">
|
||||||
|
<normaloff/>
|
||||||
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user