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/backendcontroller.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/ui/backendcontroller.h (limited to 'src/ui/backendcontroller.h') diff --git a/src/ui/backendcontroller.h b/src/ui/backendcontroller.h new file mode 100644 index 0000000..a6cfe6c --- /dev/null +++ b/src/ui/backendcontroller.h @@ -0,0 +1,39 @@ +#pragma once + +#include +#include + +class TmixApp; + +class BackendController : public TQObject +{ + TQ_OBJECT +public: + explicit BackendController( TQObject *parent = 0 ); + ~BackendController(); + + void start(); + +public slots: + void onSettingsChanged(); + +private slots: + void doSwitch(); + +private: + void stop(); + void startPulse( bool showWindow = false ); + void startAlsa( bool showWindow = false ); + + TQString m_currentBackend; + +#ifdef WITH_PULSE + class PulseModel *m_pulseModel; + class MixerWindow *m_pulseWin; +#endif +#ifdef WITH_ALSA + class AlsaModel *m_alsaModel; + class AlsaMixerWindow *m_alsaWin; + class AlsaTray *m_alsaTray; +#endif +}; -- cgit v1.2.3