From 3ab8cc5a4c62b6b53089be2c0366975dd52d397b Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Thu, 1 May 2025 18:48:24 +0200 Subject: [PATCH] Jack: Remove channel number configuration Remove the reading and saving of the channel number configuration in several places as it will default to `DEFAULT_CHANNELS` all the time anyway. Remove the LCD spin box which does not allow to make any changes to the channel numbers anyway. --- include/AudioJack.h | 6 ------ src/core/audio/AudioJack.cpp | 20 +------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/include/AudioJack.h b/include/AudioJack.h index 55113d6a4..36f5f7d39 100644 --- a/include/AudioJack.h +++ b/include/AudioJack.h @@ -53,11 +53,6 @@ namespace lmms class MidiJack; -namespace gui -{ -class LcdSpinBox; -} - class AudioJack : public QObject, public AudioDevice { @@ -88,7 +83,6 @@ public: private: QLineEdit* m_clientName; - gui::LcdSpinBox* m_channels; }; private slots: diff --git a/src/core/audio/AudioJack.cpp b/src/core/audio/AudioJack.cpp index 95ad9c0a5..4eef67453 100644 --- a/src/core/audio/AudioJack.cpp +++ b/src/core/audio/AudioJack.cpp @@ -44,13 +44,7 @@ namespace lmms AudioJack::AudioJack(bool& successful, AudioEngine* audioEngineParam) : AudioDevice( - // clang-format off - std::clamp( - ConfigManager::inst()->value("audiojack", "channels").toInt(), - DEFAULT_CHANNELS, - DEFAULT_CHANNELS - ), - // clang-format on + DEFAULT_CHANNELS, audioEngineParam) , m_client(nullptr) , m_active(false) @@ -425,16 +419,6 @@ AudioJack::setupWidget::setupWidget(QWidget* parent) m_clientName = new QLineEdit(cn, this); form->addRow(tr("Client name"), m_clientName); - - auto m = new gui::LcdSpinBoxModel(/* this */); - m->setRange(DEFAULT_CHANNELS, DEFAULT_CHANNELS); - m->setStep(2); - m->setValue(ConfigManager::inst()->value("audiojack", "channels").toInt()); - - m_channels = new gui::LcdSpinBox(1, this); - m_channels->setModel(m); - - form->addRow(tr("Channels"), m_channels); } @@ -442,7 +426,6 @@ AudioJack::setupWidget::setupWidget(QWidget* parent) AudioJack::setupWidget::~setupWidget() { - delete m_channels->model(); } @@ -451,7 +434,6 @@ AudioJack::setupWidget::~setupWidget() void AudioJack::setupWidget::saveSettings() { ConfigManager::inst()->setValue("audiojack", "clientname", m_clientName->text()); - ConfigManager::inst()->setValue("audiojack", "channels", QString::number(m_channels->value())); }