Add support for bs2b
Improve headphone listening of stereo audio records
This commit is contained in:
@@ -164,6 +164,8 @@ void BackendSettingsPage::Load() {
|
||||
ui_->spinbox_channels->setValue(s.value("channels", 2).toInt());
|
||||
ui_->widget_channels->setEnabled(ui_->checkbox_channels->isChecked());
|
||||
|
||||
ui_->checkbox_bs2b->setChecked(s.value("bs2b", false).toBool());
|
||||
|
||||
ui_->spinbox_bufferduration->setValue(s.value("bufferduration", kDefaultBufferDuration).toInt());
|
||||
ui_->spinbox_low_watermark->setValue(s.value("bufferlowwatermark", kDefaultBufferLowWatermark).toDouble());
|
||||
ui_->spinbox_high_watermark->setValue(s.value("bufferhighwatermark", kDefaultBufferHighWatermark).toDouble());
|
||||
@@ -460,6 +462,20 @@ void BackendSettingsPage::Save() {
|
||||
s.setValue("output", output_name);
|
||||
s.setValue("device", device_value);
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
if (ui_->radiobutton_alsa_hw->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_hw));
|
||||
else if (ui_->radiobutton_alsa_plughw->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_plughw));
|
||||
else if (ui_->radiobutton_alsa_pcm->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_pcm));
|
||||
else s.remove("alsaplugin");
|
||||
#endif
|
||||
|
||||
s.setValue("volume_control", ui_->checkbox_volume_control->isChecked());
|
||||
|
||||
s.setValue("channels_enabled", ui_->checkbox_channels->isChecked());
|
||||
s.setValue("channels", ui_->spinbox_channels->value());
|
||||
|
||||
s.setValue("bs2b", ui_->checkbox_bs2b->isChecked());
|
||||
|
||||
s.setValue("bufferduration", ui_->spinbox_bufferduration->value());
|
||||
s.setValue("bufferlowwatermark", ui_->spinbox_low_watermark->value());
|
||||
s.setValue("bufferhighwatermark", ui_->spinbox_high_watermark->value());
|
||||
@@ -478,18 +494,6 @@ void BackendSettingsPage::Save() {
|
||||
s.setValue("FadeoutDuration", ui_->spinbox_fadeduration->value());
|
||||
s.setValue("FadeoutPauseDuration", ui_->spinbox_fadeduration_pauseresume->value());
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
if (ui_->radiobutton_alsa_hw->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_hw));
|
||||
else if (ui_->radiobutton_alsa_plughw->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_plughw));
|
||||
else if (ui_->radiobutton_alsa_pcm->isChecked()) s.setValue("alsaplugin", static_cast<int>(alsa_plugin::alsa_pcm));
|
||||
else s.remove("alsaplugin");
|
||||
#endif
|
||||
|
||||
s.setValue("volume_control", ui_->checkbox_volume_control->isChecked());
|
||||
|
||||
s.setValue("channels_enabled", ui_->checkbox_channels->isChecked());
|
||||
s.setValue("channels", ui_->spinbox_channels->value());
|
||||
|
||||
s.endGroup();
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>583</width>
|
||||
<height>880</height>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -153,6 +153,15 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_volume_control">
|
||||
<property name="text">
|
||||
@@ -236,6 +245,13 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkbox_bs2b">
|
||||
<property name="text">
|
||||
<string>Improve headphone listening of stereo audio records (bs2b)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -699,7 +715,6 @@
|
||||
<tabstop>radiobutton_alsa_hw</tabstop>
|
||||
<tabstop>radiobutton_alsa_plughw</tabstop>
|
||||
<tabstop>radiobutton_alsa_pcm</tabstop>
|
||||
<tabstop>checkbox_volume_control</tabstop>
|
||||
<tabstop>checkbox_channels</tabstop>
|
||||
<tabstop>spinbox_channels</tabstop>
|
||||
<tabstop>spinbox_bufferduration</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user