Add a dithering option to alsoft-config
This commit is contained in:
parent
e6be113903
commit
dd6c5270b6
@ -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"*/)
|
||||
);
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user