Skip to content

Add --help/--version and skip ALSA's null mic - #34

Merged
DevanMetz merged 3 commits into
mainfrom
fix/cli-args-and-null-mic
Oct 28, 2026
Merged

DevanMetz merged 3 commits into
mainfrom
fix/cli-args-and-null-mic

Conversation

@DevanMetz

Copy link
Copy Markdown
Owner

Two fixes.

Command-line options. openmic --help used to open the full GUI.

  • -h/--help prints usage, -V/--version prints openmic <version>; both exit 0 before single-instance, update or audio setup, so they work while OpenMic is running.
  • Unknown arguments print an error plus usage to stderr and exit 2.
  • Internal flags still work: --minimized (Windows startup entry, documented in help) and --after-update <pid> (updater relaunch, kept lenient like the updater's own parser). Single-instance re-launch and Linux autostart (no args) are unchanged.
  • Windows release builds are GUI-subsystem, so the help/version/error paths attach to the parent console first; normal launches don't.

Null ALSA microphone. Without PulseAudio/PipeWire the mic picker defaulted to ALSA's null PCM ("Discard all samples (playback) or generate zero samples (capture)") and the checklist ticked "Choose your microphone".

  • Linux ALSA input listing now drops no-op devices (id null, or the null PCM's description), so they're never offered, never defaulted, and never count as a chosen mic. With no real device the existing "Microphone unavailable" / "Waiting for a device" state shows.
  • Linux-only (cfg(target_os = "linux") + ALSA host check); Windows is unchanged.
  • Unit tests for the parser and the device filter.

@DevanMetz
DevanMetz merged commit b4186ba into main Oct 28, 2026
3 checks passed
@DevanMetz
DevanMetz deleted the fix/cli-args-and-null-mic branch October 28, 2026 02:13
@DevanMetz DevanMetz mentioned this pull request Oct 28, 2026
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.

1 participant