Skip to content

Desktop: move synchronous CoreAudio PTT routing off MainActor #10442

Closed

Description

@Git-on-my-level

During investigation of Beta v0.12.117 cold-start PTT for #10441, the available logs did not implicate this path and did not prove a macOS main-thread deadlock. However, PushToTalkManager+InputDeviceRouting.swift resolves the PTT microphone from an @MainActor method, which synchronously invokes CoreAudio HAL enumeration and property reads in AudioCaptureService.inputDeviceID(forUID:), isDefaultOutputBluetooth(), and findBuiltInMicDeviceID() during turn startup. A slow or wedged audio driver can therefore pin the UI. Track moving this lookup/routing behind a bounded non-main executor, preserving the selected-device and Bluetooth fallback policy, and add a fault-injection test that stalls the HAL seam while proving PTT startup and the main run loop remain responsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions