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/main.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e8e7d36..02da9e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,12 +2,9 @@ #include #include #include -#include -#include -#include "model/pulsemodel.h" -#include "ui/mixerwindow.h" #include "ui/tmixapp.h" +#include "ui/backendcontroller.h" static TDECmdLineOptions options[] = { TDECmdLineLastOption }; @@ -31,19 +28,12 @@ int main( int argc, char **argv ) TmixApp app; app.disableSessionManagement(); - PulseModel *model = new PulseModel; - if ( !model->open() ) { - delete model; - return 1; - } + // No parent — we delete ctrl explicitly before app exits so that + // TmixTray's X11 teardown happens while the display is still open. + BackendController *ctrl = new BackendController; + ctrl->start(); - MixerWindow *win = new MixerWindow( model ); - app.setMainWindow( win ); - - TDEConfig *cfg = TDEGlobal::config(); - cfg->setGroup("General"); - if ( !cfg->readBoolEntry("DockInTray", true) ) - win->show(); - - return app.exec(); + int ret = app.exec(); + delete ctrl; + return ret; } -- cgit v1.2.3