aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-02-28 09:27:52 -0800
committerChris Robinson <[email protected]>2016-02-28 09:27:52 -0800
commit9e3a1942a39efedf685c74f49763f917ca404269 (patch)
tree5c2cdfe56b0234ad396038281ff01e45964b3f3f /utils
parent11acbfebf7e1b49c5a420dcfd5505ac4c70b46ba (diff)
Add an ALSA backend tab
Diffstat (limited to 'utils')
-rw-r--r--utils/alsoft-config/mainwindow.cpp27
-rw-r--r--utils/alsoft-config/mainwindow.ui107
2 files changed, 133 insertions, 1 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 127350f1..44302e53 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -310,6 +310,11 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->pulseAllowMovesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->pulseFixRateCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+ connect(ui->alsaDefaultDeviceLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->alsaDefaultCaptureLine, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
+ connect(ui->alsaResamplerCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+ connect(ui->alsaMmapCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+
ui->backendListWidget->setCurrentRow(0);
ui->tabWidget->setCurrentIndex(0);
@@ -672,6 +677,11 @@ void MainWindow::loadConfig(const QString &fname)
ui->pulseAllowMovesCheckBox->setChecked(settings.value("pulse/allow-moves", false).toBool());
ui->pulseFixRateCheckBox->setChecked(settings.value("pulse/fix-rate", false).toBool());
+ ui->alsaDefaultDeviceLine->setText(settings.value("alsa/device", QString()).toString());
+ ui->alsaDefaultCaptureLine->setText(settings.value("alsa/capture", QString()).toString());
+ ui->alsaResamplerCheckBox->setChecked(settings.value("alsa/allow-resampler", false).toBool());
+ ui->alsaMmapCheckBox->setChecked(settings.value("alsa/mmap", true).toBool());
+
ui->applyButton->setEnabled(false);
ui->closeCancelButton->setText(tr("Close"));
mNeedsSave = false;
@@ -881,6 +891,23 @@ void MainWindow::saveConfig(const QString &fname) const
settings.setValue("pulse/fix-rate", "true");
else
settings.remove("pulse/fix-rate"/*, "false"*/);
+
+ str = ui->alsaDefaultDeviceLine->text();
+ if(str.isEmpty()) settings.remove("alsa/device");
+ else settings.setValue("alsa/device", str);
+
+ str = ui->alsaDefaultCaptureLine->text();
+ if(str.isEmpty()) settings.remove("alsa/capture");
+ else settings.setValue("alsa/capture", str);
+
+ if(ui->alsaResamplerCheckBox->isChecked())
+ settings.setValue("alsa/allow-resampler", "true");
+ else
+ settings.remove("alsa/allow-resampler");
+ if(ui->alsaMmapCheckBox->isChecked())
+ settings.remove("alsa/mmap");
+ else
+ settings.setValue("alsa/mmap", "false");
}
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index 888546ce..3c6629f0 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -734,13 +734,18 @@ application or system to determine if it should be used.</string>
<string>PulseAudio</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>ALSA</string>
+ </property>
+ </item>
</widget>
<widget class="QStackedWidget" name="backendStackedWidget">
<property name="geometry">
<rect>
<x>110</x>
<y>10</y>
- <width>411</width>
+ <width>421</width>
<height>361</height>
</rect>
</property>
@@ -882,6 +887,106 @@ rate to match the PulseAudio device.</string>
</property>
</widget>
</widget>
+ <widget class="QWidget" name="page_3">
+ <widget class="QLabel" name="label_17">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Default Playback Device:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="alsaDefaultDeviceLine">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>30</y>
+ <width>231</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="placeholderText">
+ <string>default</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_18">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Default Capture Device:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="alsaDefaultCaptureLine">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>60</y>
+ <width>231</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="placeholderText">
+ <string>default</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="alsaResamplerCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>100</y>
+ <width>191</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Allow use of ALSA's software resampler. This lets
+the OpenAL device to be set to a different sample
+rate than the backend device, but incurs another
+resample pass on top of OpenAL's resampler.</string>
+ </property>
+ <property name="text">
+ <string>Allow Resampler</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="alsaMmapCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>100</y>
+ <width>191</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Accesses the audio device buffer through an mmap,
+potentially avoiding an extra sample buffer copy
+during updates.</string>
+ </property>
+ <property name="text">
+ <string>MMap Buffer</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QWidget" name="tab_2">