diff --git a/alsoftrc.sample b/alsoftrc.sample
index 8061ed1c..f18899a0 100644
--- a/alsoftrc.sample
+++ b/alsoftrc.sample
@@ -345,6 +345,14 @@ surround71 =
# PulseAudio server.
#fix-rate = false
+## adjust-latency:
+# Attempts to adjust the overall latency of device playback. Note that this
+# may have adverse effects on the resulting internal buffer sizes and mixing
+# updates, leading to performance problems and drop-outs. However, if the
+# PulseAudio server is creating a lot of latency, enabling this may help make
+# it more manageable.
+#adjust-latency = false
+
##
## ALSA backend stuff
##
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 56ac4f3f..2b873955 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -387,6 +387,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->pulseAutospawnCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->pulseAllowMovesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->pulseFixRateCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+ connect(ui->pulseAdjLatencyCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->jackAutospawnCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->jackBufferSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateJackBufferSizeEdit(int)));
@@ -855,6 +856,7 @@ void MainWindow::loadConfig(const QString &fname)
ui->pulseAutospawnCheckBox->setChecked(settings.value("pulse/spawn-server", true).toBool());
ui->pulseAllowMovesCheckBox->setChecked(settings.value("pulse/allow-moves", false).toBool());
ui->pulseFixRateCheckBox->setChecked(settings.value("pulse/fix-rate", false).toBool());
+ ui->pulseAdjLatencyCheckBox->setChecked(settings.value("pulse/adjust-latency", false).toBool());
ui->jackAutospawnCheckBox->setChecked(settings.value("jack/spawn-server", false).toBool());
ui->jackBufferSizeLine->setText(settings.value("jack/buffer-size", QString()).toString());
@@ -1081,6 +1083,9 @@ void MainWindow::saveConfig(const QString &fname) const
settings.setValue("pulse/fix-rate",
ui->pulseFixRateCheckBox->isChecked() ? QString("true") : QString(/*"false"*/)
);
+ settings.setValue("pulse/adjust-latency",
+ ui->pulseAdjLatencyCheckBox->isChecked() ? QString("true") : QString(/*"false"*/)
+ );
settings.setValue("jack/spawn-server",
ui->jackAutospawnCheckBox->isChecked() ? QString("true") : QString(/*"false"*/)
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 9c89cbc7..81f50b4c 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -53,7 +53,7 @@
- 5
+ 0
@@ -131,8 +131,8 @@ to stereo output.
380
20
- 80
- 20
+ 93
+ 29
@@ -1185,6 +1185,9 @@ application or system to determine if it should be used.
361
+
+ 0
+
@@ -1319,6 +1322,26 @@ rate to match the PulseAudio device.
Fix Sample Rate
+
+
+
+ 20
+ 100
+ 111
+ 21
+
+
+
+ Attempts to adjust the overall latency of device
+playback. Note that this may have adverse effects
+on the resulting internal buffer sizes and mixing
+updates, leading to performance problems and
+drop-outs.
+
+
+ Adjust Latency
+
+
@@ -2178,8 +2201,8 @@ added by the ALC_EXT_DEDICATED extension.
160
20
- 108
- 20
+ 125
+ 29
@@ -2348,7 +2371,7 @@ added by the ALC_EXT_DEDICATED extension.
0
0
564
- 21
+ 27