aboutsummaryrefslogtreecommitdiffstats
path: root/utils/alsoft-config
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-02-27 19:18:57 -0800
committerChris Robinson <[email protected]>2016-02-27 19:18:57 -0800
commita12c420c591ef90dd50aabd435a9e995681232a2 (patch)
tree5813431d07e180eb031b7242ab861ef45835e46e /utils/alsoft-config
parent0e1edc151d410a73be29f01f2320812ab916a62b (diff)
Reorganize the Backends tab and add a PulseAudio section
Diffstat (limited to 'utils/alsoft-config')
-rw-r--r--utils/alsoft-config/mainwindow.cpp26
-rw-r--r--utils/alsoft-config/mainwindow.ui236
2 files changed, 199 insertions, 63 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 63a29714..f1516e4b 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -306,6 +306,13 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->enableModulatorCheck, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(ui->enableDedicatedCheck, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
+ 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()));
+
+ ui->backendListWidget->setCurrentRow(0);
+ ui->tabWidget->setCurrentIndex(0);
+
loadConfig(getDefaultConfigName());
}
@@ -631,6 +638,10 @@ void MainWindow::loadConfig(const QString &fname)
ui->enableModulatorCheck->setChecked(!excludefx.contains("modulator", Qt::CaseInsensitive));
ui->enableDedicatedCheck->setChecked(!excludefx.contains("dedicated", Qt::CaseInsensitive));
+ 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->applyButton->setEnabled(false);
ui->closeCancelButton->setText(tr("Close"));
mNeedsSave = false;
@@ -772,7 +783,7 @@ void MainWindow::saveConfig(const QString &fname) const
if(ui->emulateEaxCheckBox->isChecked())
settings.setValue("reverb/emulate-eax", "true");
else
- settings.setValue("reverb/emulate-eax", QString()/*"false"*/);
+ settings.remove("reverb/emulate-eax"/*, "false"*/);
strlist.clear();
if(!ui->enableEaxReverbCheck->isChecked())
@@ -807,6 +818,19 @@ void MainWindow::saveConfig(const QString &fname) const
if(str == QString())
settings.remove(key);
}
+
+ if(ui->pulseAutospawnCheckBox->isChecked())
+ settings.remove("pulse/spawn-server"/*, "true"*/);
+ else
+ settings.setValue("pulse/spawn-server", "false");
+ if(ui->pulseAllowMovesCheckBox->isChecked())
+ settings.setValue("pulse/allow-moves", "true");
+ else
+ settings.remove("pulse/allow-moves"/*, "false"*/);
+ if(ui->pulseFixRateCheckBox->isChecked())
+ settings.setValue("pulse/fix-rate", "true");
+ else
+ settings.remove("pulse/fix-rate"/*, "false"*/);
}
diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui
index a362d845..888546ce 100644
--- a/utils/alsoft-config/mainwindow.ui
+++ b/utils/alsoft-config/mainwindow.ui
@@ -712,80 +712,176 @@ application or system to determine if it should be used.</string>
<attribute name="title">
<string>Backends</string>
</attribute>
- <widget class="QCheckBox" name="backendCheckBox">
+ <widget class="QListWidget" name="backendListWidget">
<property name="geometry">
<rect>
- <x>170</x>
- <y>200</y>
- <width>161</width>
- <height>21</height>
+ <x>0</x>
+ <y>11</y>
+ <width>111</width>
+ <height>361</height>
</rect>
</property>
- <property name="toolTip">
- <string>When checked, allows all other available backends not listed in the priority or disabled lists.</string>
- </property>
- <property name="text">
- <string>Allow Other Backends</string>
- </property>
- <property name="checked">
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
+ <item>
+ <property name="text">
+ <string>General</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PulseAudio</string>
+ </property>
+ </item>
</widget>
- <widget class="QListWidget" name="enabledBackendList">
- <property name="geometry">
- <rect>
- <x>40</x>
- <y>40</y>
- <width>191</width>
- <height>151</height>
- </rect>
- </property>
- <property name="toolTip">
- <string>The backend driver list order. Unknown backends and
-duplicated names are ignored.</string>
- </property>
- <property name="dragDropMode">
- <enum>QAbstractItemView::InternalMove</enum>
- </property>
- </widget>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>40</x>
- <y>20</y>
- <width>191</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Priority Backends:</string>
- </property>
- </widget>
- <widget class="QListWidget" name="disabledBackendList">
- <property name="geometry">
- <rect>
- <x>270</x>
- <y>40</y>
- <width>191</width>
- <height>151</height>
- </rect>
- </property>
- <property name="toolTip">
- <string>Disabled backend driver list.</string>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
+ <widget class="QStackedWidget" name="backendStackedWidget">
<property name="geometry">
<rect>
- <x>270</x>
- <y>20</y>
- <width>191</width>
- <height>20</height>
+ <x>110</x>
+ <y>10</y>
+ <width>411</width>
+ <height>361</height>
</rect>
</property>
- <property name="text">
- <string>Disabled Backends:</string>
+ <property name="currentIndex">
+ <number>0</number>
</property>
+ <widget class="QWidget" name="page">
+ <widget class="QCheckBox" name="backendCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>190</y>
+ <width>391</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>When checked, allows all other available backends not listed in the priority or disabled lists.</string>
+ </property>
+ <property name="text">
+ <string>Allow Other Backends</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QListWidget" name="disabledBackendList">
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>30</y>
+ <width>191</width>
+ <height>151</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Disabled backend driver list.</string>
+ </property>
+ </widget>
+ <widget class="QListWidget" name="enabledBackendList">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>30</y>
+ <width>191</width>
+ <height>151</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>The backend driver list order. Unknown backends and
+duplicated names are ignored.</string>
+ </property>
+ <property name="dragDropMode">
+ <enum>QAbstractItemView::InternalMove</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_2">
+ <property name="geometry">
+ <rect>
+ <x>230</x>
+ <y>10</y>
+ <width>171</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Disabled Backends:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>10</y>
+ <width>171</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Priority Backends:</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="page_2">
+ <widget class="QCheckBox" name="pulseAutospawnCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>10</y>
+ <width>141</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Automatically spawn a PulseAudio server if one
+is not already running.</string>
+ </property>
+ <property name="text">
+ <string>AutoSpawn Server</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="pulseAllowMovesCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>40</y>
+ <width>161</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Allows moving PulseAudio streams to different
+devices during playback or capture. Note that the
+device specifier and device format will not change
+to match the new device.</string>
+ </property>
+ <property name="text">
+ <string>Allow Moving Streams</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="pulseFixRateCheckBox">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>70</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>When checked, fix the OpenAL device's sample
+rate to match the PulseAudio device.</string>
+ </property>
+ <property name="text">
+ <string>Fix Sample Rate</string>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QWidget" name="tab_2">
@@ -1494,6 +1590,22 @@ added by the ALC_EXT_DEDICATED extension.</string>
</hint>
</hints>
</connection>
+ <connection>
+ <sender>backendListWidget</sender>
+ <signal>currentRowChanged(int)</signal>
+ <receiver>backendStackedWidget</receiver>
+ <slot>setCurrentIndex(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>69</x>
+ <y>233</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>329</x>
+ <y>232</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>ShowHRTFContextMenu(QPoint)</slot>