Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
michaelgregorius authored and JohannesLorenz committed May 31, 2025
commit 631fdeffcc7e8ce72a1b08d26d081c0955d9fb0f
6 changes: 0 additions & 6 deletions include/AudioJack.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ namespace lmms

class MidiJack;

namespace gui
{
class LcdSpinBox;
}


class AudioJack : public QObject, public AudioDevice
{
Expand Down Expand Up @@ -88,7 +83,6 @@ class AudioJack : public QObject, public AudioDevice

private:
QLineEdit* m_clientName;
gui::LcdSpinBox* m_channels;
};

private slots:
Expand Down
20 changes: 1 addition & 19 deletions src/core/audio/AudioJack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ namespace lmms

AudioJack::AudioJack(bool& successful, AudioEngine* audioEngineParam)
: AudioDevice(
// clang-format off
std::clamp<int>(
ConfigManager::inst()->value("audiojack", "channels").toInt(),
DEFAULT_CHANNELS,
DEFAULT_CHANNELS
),
// clang-format on
DEFAULT_CHANNELS,
audioEngineParam)
, m_client(nullptr)
, m_active(false)
Expand Down Expand Up @@ -425,24 +419,13 @@ 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);
}




AudioJack::setupWidget::~setupWidget()
{
delete m_channels->model();
}


Expand All @@ -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<int>()));
}


Expand Down