From 3909a06fe6786027c83e3adaef89c343cde4fbe3 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Sun, 17 May 2026 23:38:18 -0400 Subject: ALSA backend, backend switcher, UX fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ALSA backend: AlsaModel, AlsaDevice, AlsaMixerWindow, AlsaTray, AlsaPopup - BackendController: live pulse↔alsa switching, preserves window position/visibility - PA shutdown fix: stop mainloop thread before disconnect/free to prevent crash - Exit crash fix: BackendController deleted explicitly before TQApplication exits - Waiting-for-PulseAudio placeholder when PA not connected - Preferences: live backend stack (Pulse/ALSA), Startup/Exit card with autostart, Recording card, no-tabs greying, remove stale "requires restart" label - Recording tray: track source outputs directly; fix LED init in popup; level meter forwarding for monitor-source recordings via m_monitorSourceToSink - TmixTray: fix config group General→Tray for scroll/mute/popup settings; RecordingTray suppresses right-click menu - audiodevice.h: add recordingActive() virtual accessor Co-Authored-By: Claude Sonnet 4.6 --- src/ui/alsa/alsadevicespage.h | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/ui/alsa/alsadevicespage.h (limited to 'src/ui/alsa/alsadevicespage.h') diff --git a/src/ui/alsa/alsadevicespage.h b/src/ui/alsa/alsadevicespage.h new file mode 100644 index 0000000..4883f85 --- /dev/null +++ b/src/ui/alsa/alsadevicespage.h @@ -0,0 +1,66 @@ +#pragma once + +#include +#include + +class AlsaModel; +class AlsaDevice; +class TQScrollView; +class TQComboBox; +class KLedButton; + +// ── One row per Switch element ────────────────────────────────────────────── + +class AlsaSwitchRow : public TQWidget +{ + TQ_OBJECT +public: + AlsaSwitchRow( AlsaDevice *dev, TQWidget *parent = 0 ); + +private slots: + void onMuteChanged( bool m ); + void onLedToggled( bool on ); + +private: + AlsaDevice *m_dev; + KLedButton *m_led; +}; + +// ── One row per Enum element ──────────────────────────────────────────────── + +class AlsaEnumRow : public TQWidget +{ + TQ_OBJECT +public: + AlsaEnumRow( AlsaDevice *dev, TQWidget *parent = 0 ); + +private slots: + void onEnumChanged( int id ); + void onComboActivated( int idx ); + +private: + AlsaDevice *m_dev; + TQComboBox *m_combo; +}; + +// ── Device Settings page ──────────────────────────────────────────────────── + +class AlsaDevicesPage : public TQWidget +{ + TQ_OBJECT +public: + explicit AlsaDevicesPage( AlsaModel *model, TQWidget *parent = 0 ); + + void setCard( int cardIndex ); + +private slots: + void onDeviceAdded( AlsaDevice * ); + +private: + void rebuild(); + + AlsaModel *m_model; + int m_cardIndex; + TQScrollView *m_scroll; + TQWidget *m_content; +}; -- cgit v1.2.3