From 8f56c9522e65405d591ee2eacdcbf9e29caab9fe Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 26 Apr 2017 19:27:50 -0700 Subject: Document the output-limiter config option Expose it in alsoft-config as well. --- utils/alsoft-config/mainwindow.cpp | 16 ++++++++++++++++ utils/alsoft-config/mainwindow.ui | 29 +++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 26d05f8f..d46bb029 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -328,6 +328,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->decoderHQModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->decoderDistCompCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); @@ -641,6 +642,13 @@ void MainWindow::loadConfig(const QString &fname) updatePeriodCountSlider(); } + if(settings.value("output-limiter").isNull()) + ui->outputLimiterCheckBox->setCheckState(Qt::PartiallyChecked); + else + ui->outputLimiterCheckBox->setCheckState( + settings.value("output-limiter").toBool() ? Qt::Checked : Qt::Unchecked + ); + QString stereopan = settings.value("stereo-encoding").toString(); ui->stereoEncodingComboBox->setCurrentIndex(0); if(stereopan.isEmpty() == false) @@ -896,6 +904,14 @@ void MainWindow::saveConfig(const QString &fname) const settings.setValue("stereo-encoding", getValueFromName(stereoEncList, ui->stereoEncodingComboBox->currentText())); settings.setValue("ambi-format", getValueFromName(ambiFormatList, ui->ambiFormatComboBox->currentText())); + Qt::CheckState limiter = ui->outputLimiterCheckBox->checkState(); + if(limiter == Qt::PartiallyChecked) + settings.setValue("output-limiter", QString()); + else if(limiter == Qt::Checked) + settings.setValue("output-limiter", QString("true")); + else if(limiter == Qt::Unchecked) + settings.setValue("output-limiter", 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 a527cfd5..153bcc04 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -129,7 +129,7 @@ to stereo output. 380 20 91 - 21 + 29 @@ -236,9 +236,9 @@ otherwise be suitable for speakers. -11 - 200 + 180 551 - 181 + 201 @@ -483,6 +483,27 @@ receiver. + + + + 30 + 160 + 231 + 20 + + + + Applies a gain limiter on the final mixed output. This reduces the +volume when the output samples would otherwise be clamped, +avoiding excessive clipping noise. + + + Enable Gain Limiter + + + true + + @@ -2107,7 +2128,7 @@ added by the ALC_EXT_DEDICATED extension. 160 20 123 - 21 + 29 -- cgit v1.2.3