Add an adjust-latency config option for PulseAudio

This commit is contained in:
Chris Robinson
2018-12-25 17:04:54 -08:00
parent 6a8c791e3c
commit 497226f11e
3 changed files with 42 additions and 6 deletions
+8
View File
@@ -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
##
+5
View File
@@ -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"*/)
+29 -6
View File
@@ -53,7 +53,7 @@
</rect>
</property>
<property name="currentIndex">
<number>5</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
@@ -131,8 +131,8 @@ to stereo output.</string>
<rect>
<x>380</x>
<y>20</y>
<width>80</width>
<height>20</height>
<width>93</width>
<height>29</height>
</rect>
</property>
<property name="toolTip">
@@ -1185,6 +1185,9 @@ application or system to determine if it should be used.</string>
<height>361</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<widget class="QCheckBox" name="backendCheckBox">
<property name="geometry">
@@ -1319,6 +1322,26 @@ rate to match the PulseAudio device.</string>
<string>Fix Sample Rate</string>
</property>
</widget>
<widget class="QCheckBox" name="pulseAdjLatencyCheckBox">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>111</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string>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.</string>
</property>
<property name="text">
<string>Adjust Latency</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_7">
<widget class="QCheckBox" name="jackAutospawnCheckBox">
@@ -2178,8 +2201,8 @@ added by the ALC_EXT_DEDICATED extension.</string>
<rect>
<x>160</x>
<y>20</y>
<width>108</width>
<height>20</height>
<width>125</width>
<height>29</height>
</rect>
</property>
<property name="sizeAdjustPolicy">
@@ -2348,7 +2371,7 @@ added by the ALC_EXT_DEDICATED extension.</string>
<x>0</x>
<y>0</y>
<width>564</width>
<height>21</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">