Add exclusive mode option for WASAPI
This commit is contained in:
@@ -96,6 +96,12 @@ BackendSettingsPage::BackendSettingsPage(SettingsDialog *dialog, QWidget *parent
|
||||
QObject::connect(ui_->checkbox_channels, &QCheckBox::toggled, ui_->widget_channels, &QSpinBox::setEnabled);
|
||||
QObject::connect(ui_->button_buffer_defaults, &QPushButton::clicked, this, &BackendSettingsPage::BufferDefaults);
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
ui_->widget_exclusive_mode->show();
|
||||
#else
|
||||
ui_->widget_exclusive_mode->hide();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
BackendSettingsPage::~BackendSettingsPage() {
|
||||
@@ -149,6 +155,10 @@ void BackendSettingsPage::Load() {
|
||||
ui_->widget_alsa_plugin->hide();
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
ui_->checkbox_exclusive_mode->setChecked(s.value("exclusive_mode", false).toBool());
|
||||
#endif
|
||||
|
||||
if (EngineInitialized()) Load_Engine(enginetype);
|
||||
|
||||
ui_->checkbox_volume_control->setChecked(s.value("volume_control", true).toBool());
|
||||
@@ -333,6 +343,10 @@ void BackendSettingsPage::Load_Output(QString output, QVariant device) {
|
||||
|
||||
if (ui_->combobox_output->count() >= 1) Load_Device(output, device);
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
ui_->widget_exclusive_mode->setEnabled(engine()->ExclusiveModeSupport(output));
|
||||
#endif
|
||||
|
||||
FadingOptionsChanged();
|
||||
|
||||
}
|
||||
@@ -481,6 +495,10 @@ void BackendSettingsPage::Save() {
|
||||
else s.remove("alsaplugin");
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
s.setValue("exclusive_mode", ui_->checkbox_exclusive_mode->isChecked());
|
||||
#endif
|
||||
|
||||
s.setValue("volume_control", ui_->checkbox_volume_control->isChecked());
|
||||
|
||||
s.setValue("channels_enabled", ui_->checkbox_channels->isChecked());
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>717</width>
|
||||
<height>1245</height>
|
||||
<height>1259</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -153,6 +153,47 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_exclusive_mode" native="true">
|
||||
<layout class="QHBoxLayout" name="layout_exclusive_mode">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_exclusive_mode">
|
||||
<property name="text">
|
||||
<string>Exclusive mode (Experimental)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_exclusive_mode">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user