Skip to content

[macOS] Check macOS DAX driver before enabling#1141

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:bug/audio-driver-check
Apr 11, 2026
Merged

[macOS] Check macOS DAX driver before enabling#1141
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:bug/audio-driver-check

Conversation

@jensenpat

@jensenpat jensenpat commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • verify the macOS DAX HAL driver bundle before trying to enable DAX
  • show a user-facing warning when the driver is missing and direct the user to install it from the AetherSDR DMG package
  • keep the DAX toggle off when startup fails instead of leaving the UI in a misleading enabled state

Root Cause

The DAX startup path only did a narrow file existence check and several callers assumed startup succeeded. On macOS, that let the UI show DAX as enabled even when the HAL driver was not properly installed or the bridge could not open.

Validation

  • focused local verification in the worktree
  • full app build tested with and without driver installed

@jensenpat jensenpat changed the title [codex] Check macOS DAX driver before enabling [macOS] Check macOS DAX driver before enabling Apr 10, 2026
@jensenpat jensenpat marked this pull request as ready for review April 10, 2026 18:51
@jensenpat jensenpat requested a review from ten9876 as a code owner April 10, 2026 18:51

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix overall — the deeper bundle check (Contents/MacOS/ + Info.plist), the void → bool return, and the UI reset in the daxToggled path are all the right calls. Two things worth addressing before merge:


1. Menu-action path doesn't reset its check state on failure (buildMenuBar)

The daxToggled lambda correctly calls setDaxEnabled(false) when startDax() returns false, but the menu-action lambda only acts on success:

// buildMenuBar (current)
if (on) {
    if (startDax() && m_appletPanel && m_appletPanel->catApplet())
        m_appletPanel->catApplet()->setDaxEnabled(true);
    // no else — menu item stays checked, catApplet stays unchecked → inconsistent
}

Suggested fix — mirror the daxToggled path:

if (on) {
    if (startDax()) {
        if (m_appletPanel && m_appletPanel->catApplet())
            m_appletPanel->catApplet()->setDaxEnabled(true);
    } else {
        // uncheck the menu action and keep catApplet consistent
        sender()->setProperty("checked", false);  // or keep a captured QAction* ref
        if (m_appletPanel && m_appletPanel->catApplet())
            m_appletPanel->catApplet()->setDaxEnabled(false);
    }
}

(Exact reset depends on whether the menu action reference is captured in the lambda — the point is to uncheck it and sync the catApplet.)


2. QMessageBox::warning fires during silent autostart

onConnectionStateChanged calls startDax() inside a 3-second QTimer::singleShot when AutoStartDAX is enabled. With the new dialog, every time the user connects on a Mac without the driver installed they'll get a blocking warning 3 seconds after the connection completes — even though they never explicitly asked to enable DAX in that session.

Consider suppressing the dialog in that path and logging at qWarning() instead (the user can investigate from the log). The dialog is appropriate for an explicit toggle action, but it's jarring as a side-effect of connecting.


No other concerns. Scope is tight (only MainWindow.cpp/.h), AppSettings usage is correct (the path constants are read-only via QFileInfo), and there are no resource leaks in the m_daxBridge failure path. Thanks for the contribution @jensenpat.

@ten9876 ten9876 merged commit 4d56760 into aethersdr:main Apr 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants