Skip to content

Show live sound indicators for microphone and system audio #153

Open

Description

@jsattler

Why

Recordings often end up silent because of a setup mistake, like the wrong microphone, muted output or a missing permission. Users only find out after they stop recording. A live indicator lets them confirm that audio is coming in before they start and while they record. (Discussion #145)

What

Sound indicator

  • Looks like the Voice Memos app: thin bars, vertically centered, that scroll with the newest bar on the right.
  • Each bar's height follows the loudness at that moment. Silence shows as a flat baseline.
  • There is one indicator per source: System Audio and Microphone.
  • When a source is turned off, its indicator shows a dimmed flat line.

Where it appears

  1. Menu bar, Audio section: next to the System Audio and Microphone toggles. The indicators stay live while recording, even though the section's controls are disabled.
  2. Settings window, Audio pane: next to the same toggles.
  3. Compact badge: two new tiles, captioned "System" and "Mic", in both the idle and the recording badge. The sound wave takes the place of the icon in each tile. When a source is turned off, its tile is shown dimmed.

When it is live

  • Recording: levels come from the audio that is already being recorded. Nothing else is opened.
  • Idle: the indicators run only while one of the views above is visible and that source is turned on. They stop as soon as the view is closed or hidden.
  • Changing the microphone device switches the indicator to the new device right away.
  • Paused: the indicators keep showing live levels, dimmed.

Note

Idle metering opens the microphone and a system audio stream, so macOS shows its mic and screen-capture privacy indicators while one of these views is visible. With the compact badge on screen, that means the whole time.

Acceptance criteria

  • Speaking into the selected microphone moves the Microphone indicator in all three places.
  • Playing audio moves the System Audio indicator, whatever content is selected (display, window or app).
  • While idle, nothing is opened for metering once the menu, the Settings window and the badge are all closed or hidden: the privacy indicators turn off.
  • Turning a source off dims its indicator and badge tile and stops metering that source.
  • Starting a recording from the idle view works without conflicts or audio gaps.
  • The badge keeps a stable size, so adding the tiles doesn't cause any resize loops.
  • The loudness calculation and the bar history are covered by unit tests.

Out of scope

  • Clipping warnings, per-channel meters and gain control.
  • Recordings started from the CLI don't drive the UI indicators.
Agent notes
  • Level math: a pure function that turns samples into an RMS value, converts it to dBFS and maps −50…0 dB to 0…1. Unit-tested.
  • AudioLevelMonitor: a @MainActor @Observable class that keeps two fixed-length bar histories (about 30 bars each), updated about 20 times a second. Metering itself happens off the main actor.
  • Recording tap: CaptureEngine.stream(_:didOutputSampleBuffer:of:) sends .audio and .microphone buffers to the meter as well as to the AssetWriter. sampleBufferDelegate only holds one delegate today.
  • Idle sources:
    • Microphone: an AVCaptureSession with an audio data output on the selected device.
    • System audio: reuse SystemAudioStream.
    • Count the visible views that need metering (menu bar, Settings window, badge), and stop idle metering before startRecording.
  • Badge: use a fixed 64×48 tile, following the warning about fractional sizes in CompactBadgeView.swift.

Activity

  1. added
    enhancement
    on May 9, 2026
  2. changed the title [-]Create a dynamic volume display[/-] [+]Create sound indicators for microphone and system audio [/+] on May 9, 2026
  3. self-assigned this
    on May 9, 2026
  4. changed the title [-]Create sound indicators for microphone and system audio [/-] [+]Show live sound indicators for microphone and system audio[/+] on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions