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 | |
parent | e6be113903e9a92734b1885b1506c8940940705f (diff) |
Add a dithering option to alsoft-config
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 16 | ||||
-rw-r--r-- | utils/alsoft-config/mainwindow.ui | 21 |
2 files changed, 37 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"*/) ); diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui index 153bcc04..23d7573a 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -504,6 +504,27 @@ avoiding excessive clipping noise.</string> <bool>true</bool> </property> </widget> + <widget class="QCheckBox" name="outputDitherCheckBox"> + <property name="geometry"> + <rect> + <x>270</x> + <y>160</y> + <width>261</width> + <height>21</height> + </rect> + </property> + <property name="toolTip"> + <string>Applies dithering on the final mix for 8- and 16-bit output. +This replaces the distortion created by nearest-value +quantization with low-level whitenoise.</string> + </property> + <property name="text"> + <string>Enable Dithering</string> + </property> + <property name="tristate"> + <bool>true</bool> + </property> + </widget> </widget> <widget class="QGroupBox" name="groupBox_4"> <property name="geometry"> |