Repository navigation
Open
Labels
enhancementNew feature or request
Description
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
- 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.
- Settings window, Audio pane: next to the same toggles.
- 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 @Observableclass 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.audioand.microphonebuffers to the meter as well as to theAssetWriter.sampleBufferDelegateonly holds one delegate today. - Idle sources:
- Microphone: an
AVCaptureSessionwith 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.
- Microphone: an
- Badge: use a fixed 64×48 tile, following the warning about fractional sizes in
CompactBadgeView.swift.
Reacted by Anawat Wannapila
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
[-]Create a dynamic volume display[/-][+]Create sound indicators for microphone and system audio [/+][-]Create sound indicators for microphone and system audio [/-][+]Show live sound indicators for microphone and system audio[/+]