summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@pobox.com>2026-05-17 23:38:18 -0400
committerCalvin Morrison <calvin@pobox.com>2026-05-17 23:38:18 -0400
commit3909a06fe6786027c83e3adaef89c343cde4fbe3 (patch)
treef5ea87c98b50764c8ad87e598f274319df0e74db /src/main.cpp
parent311b69c14203860ab6d98bd11633eea287c8f04e (diff)
ALSA backend, backend switcher, UX fixesalsa-wip
- 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 <noreply@anthropic.com>
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp26
1 files changed, 8 insertions, 18 deletions
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 <tdecmdlineargs.h>
#include <tdeaboutdata.h>
#include <tdelocale.h>
-#include <tdeconfig.h>
-#include <tdeglobal.h>
-#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;
}