diff options
author | Chris Robinson <[email protected]> | 2017-05-23 01:12:49 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-05-23 01:12:49 -0700 |
commit | dd6c5270b6e9dd041dd7560e4836d269482fa5b7 (patch) | |
tree | 915c4c4c33bd89395ed55df243f6dbd59b100c47 /utils/alsoft-config/mainwindow.cpp | |
parent | e6be113903e9a92734b1885b1506c8940940705f (diff) |
Add a dithering option to alsoft-config
Diffstat (limited to 'utils/alsoft-config/mainwindow.cpp')
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 4f16726f..a743ca6a 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -329,6 +329,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->stereoEncodingComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton())); connect(ui->ambiFormatComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(enableApplyButton())); connect(ui->outputLimiterCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(ui->outputDitherCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->decoderHQModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->decoderDistCompCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); @@ -654,6 +655,13 @@ void MainWindow::loadConfig(const QString &fname) settings.value("output-limiter").toBool() ? Qt::Checked : Qt::Unchecked ); + if(settings.value("dither").isNull()) + ui->outputDitherCheckBox->setCheckState(Qt::PartiallyChecked); + else + ui->outputDitherCheckBox->setCheckState( + settings.value("dither").toBool() ? Qt::Checked : Qt::Unchecked + ); + QString stereopan = settings.value("stereo-encoding").toString(); ui->stereoEncodingComboBox->setCurrentIndex(0); if(stereopan.isEmpty() == false) @@ -917,6 +925,14 @@ void MainWindow::saveConfig(const QString &fname) const else if(limiter == Qt::Unchecked) settings.setValue("output-limiter", QString("false")); + Qt::CheckState dither = ui->outputDitherCheckBox->checkState(); + if(dither == Qt::PartiallyChecked) + settings.setValue("dither", QString()); + else if(dither == Qt::Checked) + settings.setValue("dither", QString("true")); + else if(dither == Qt::Unchecked) + settings.setValue("dither", QString("false")); + settings.setValue("decoder/hq-mode", ui->decoderHQModeCheckBox->isChecked() ? QString("true") : QString(/*"false"*/) ); |