Repository navigation
Explain stuck coreaudiod instead of a generic "Recording failed to start" - #1020
Merged
Beingpax merged 2 commits intoOct 18, 2026
Merged
Conversation
When coreaudiod gets wedged (usually after long uptime with many
sleep/wake cycles), AudioOutputUnitStart fails with
kAudioHardwareNotRunningError ('stop'). Recorder folded that into
couldNotStartRecording, so the user only saw "Recording failed to
start". Restarting VoiceInk doesn't help because the broken state lives
in coreaudiod, which only an admin can restart.
Detect that status and show a specific message with a "Restart Audio"
action that runs `killall coreaudiod` through the standard admin
password prompt.
Closes Beingpax#1018
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
…failures The Restart Audio action now passes a localized prompt to the admin dialog, so the user sees that sound in all apps will cut out before confirming, instead of a generic osascript prompt. A failed launch or a non-zero osascript exit (including a cancelled prompt) is logged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1018
When coreaudiod gets wedged, AudioOutputUnitStart (or an earlier AUHAL call on the retry) returns
kAudioHardwareNotRunningError('stop'). Recorder folded that intocouldNotStartRecording, so the user only saw "Recording failed to start", and restarting VoiceInk did nothing.Made three changes:
CoreAudioRecorderErrorgets astatusproperty so the OSStatus can be read from any case.Recorderthrows a newRecorderError.audioSystemNotRunningwhen that status is 'stop'.recordingAudioFailuremaps it the same way asnoUsableMicrophone: a specific message plus a "Restart Audio" button that runskillall coreaudiodthrough the admin password prompt.Added de/fr/zh-Hans strings to match the catalog.
Before:

After:

Built locally with Xcode 27. Checked in a debug build that the real toast shows and that the status match fires for 'stop' and not for other codes. I couldn't wedge coreaudiod on demand, so the full fail, restart, record loop wasn't run end to end. The restart command is the one that fixed it on my machine.
The admin prompt says up front that sound in all apps will cut out for a moment.
Not covered: the mid-recording device switch path can hit the same status. Left it out to keep this small.