Microphone
Live audio input monitoring with real-time waveform visualizations, volume metering, and detailed audio engine diagnostics.
Overview
The Microphone tool turns your device into a live audio monitor. It captures audio from the selected input device using Apple's AVAudioEngine, processes the PCM buffer in real time, and presents the results through multiple visualization panels: a circular amplitude gauge, a raw audio waveform, a rolling volume history graph, and a comprehensive technical details dashboard. You can switch between all available audio input devices — built-in microphone, Bluetooth headsets (including AirPods via HFP), wired headset microphones, USB audio interfaces, CarPlay, and AirPlay — without leaving the tool.
Monitoring starts automatically when the tool is opened and microphone permission has been granted. Audio capture stops automatically when you leave the tool or the app enters the background, ensuring no lingering microphone usage.
Table Of Contents
- Screen Header
- Microphone Control Panel
- Audio Input Device Selector
- Volume Levels Panel
- Live Audio Waveform Panel
- Volume Analysis Panel
- Technical Details Panel
- Privacy Disclaimer
- Permissions
- Technical Details
- Notes And Limitations
Screen Header
At the top of the screen, a header displays:
- Microphone Monitor title.
- A recording status indicator — a colored dot with a label:
- Active (green) — the audio engine is running and capturing audio.
- Inactive (gray) — monitoring is stopped.
- A device count — the number of audio input devices currently available (e.g. "1 Devices").
Microphone Control Panel
The Microphone Control panel is the first card on the screen. Its header shows a RECORDING or STANDBY badge with a pulsing red dot when recording.
Record Button
A large circular button in the center of the panel:
- Mic icon (blue) — tap to start monitoring. The audio engine starts, waveform data begins flowing, and all visualization panels activate.
- Stop icon (red) — tap to stop monitoring. The audio engine is torn down and visualizations freeze.
A label below the button reads TAP TO RECORD or TAP TO STOP depending on the current state.
Device Info Section
Below the record button, the panel shows information about the currently active audio input:
-
Device — the name of the active input device (e.g. "Built-in Microphone", "AirPods Pro", or "No Microphone" when none is detected).
-
Three status cards in a grid:
Card Description Status Active (green) or Inactive (red). Type The device category: Internal, Headset, Bluetooth, USB Audio, CarPlay, AirPlay, or External. Quality HIGH QUALITY when the sample rate is 48 kHz or above, STANDARD otherwise. -
Two technical spec cards below the grid:
Card Description Sample Rate The active audio session sample rate (e.g. "48.0 kHz"). Channels The maximum number of input channels supported by the device.
Audio Input Device Selector
The device selector panel lists all available audio input devices and lets you switch between them.
- Built-in Microphone — always listed first with the subtitle "Internal device microphone". Selected by default when no external device is connected.
- External devices — listed below the built-in microphone, each showing:
-
The device name (e.g. "AirPods Pro", "USB Microphone").
-
A subtitle describing the connection type:
Port Type Subtitle Bluetooth A2DP Bluetooth A2DP Bluetooth HFP Bluetooth Hands-Free Bluetooth LE Bluetooth LE Headphones Headphones Headset Mic Headset Microphone USB Audio USB Audio Other External Device
-
Each device row has a radio-button indicator (filled when selected) and a checkmark icon for the active device. Tapping a different device switches the audio input. While the audio engine reconfigures, a loading indicator appears briefly over the screen.
When a device is connected or disconnected (e.g. plugging in AirPods), the list updates automatically. The tool auto-selects the best available device using a priority order: Bluetooth HFP first, then headset mic, then built-in microphone.
Volume Levels Panel
The Volume Levels panel provides a detailed real-time view of the current audio amplitude.
Circular Amplitude Gauge
A circular gauge in the center of the panel that fills proportionally to the current amplitude (0–100%). The arc uses an angular gradient from green (low) through yellow and orange to red (high). The current amplitude percentage is displayed as a large number in the center of the gauge.
Volume Bar
Below the gauge, a horizontal bar fills from left to right based on the current amplitude. The bar uses the same green-to-red gradient and includes scale markings at 0%, 25%, 50%, 75%, and 100%.
Volume Metrics
Four metric cards are displayed in a 2x2 grid:
| Metric | Description |
|---|---|
| Current | The instantaneous amplitude as a percentage, color-coded by level (green < 30%, yellow < 60%, orange < 85%, red >= 85%). |
| Peak | The highest amplitude value in the current waveform history buffer. |
| RMS | The root-mean-square level computed from the waveform history, representing the average signal energy. |
| dBFS | The current amplitude expressed in decibels relative to full scale, computed as 20 × log10(amplitude). Values range from approximately -80 dB (silence) to 0 dB (full scale). |
Volume Status Bar
At the bottom of the panel, a status bar shows:
- Signal quality — "STRONG SIGNAL" (green) when dBFS is above -20 dB, or "MODERATE SIGNAL" (orange) otherwise.
- Clipping warning — a red "CLIPPING" label with a warning icon appears when the amplitude exceeds 95%, indicating the audio signal may be distorting.
Live Audio Waveform Panel
The Live Audio Waveform panel displays the raw PCM audio data as a real-time oscilloscope-style visualization.
Waveform Visualization
The main area shows a scrolling waveform rendered from the raw audio buffer samples (up to 1024 samples per frame). The waveform is drawn in cyan against a dark background with a professional grid overlay:
- Grid — vertical and horizontal reference lines for visual alignment.
- Center line — a dashed cyan line marking the zero-crossing point.
- dB scale markers — labels on the left edge at +0 dB, -20 dB, -40 dB, -60 dB, and -∞.
- Glow effect — a subtle radial glow behind the waveform that intensifies with signal strength.
- Reflection — a faint mirrored copy of the waveform below the center line for visual depth.
A LIVE indicator with a pulsing green dot and the current sample count (e.g. "1024 samples") appears in the panel header.
Signal Level Indicators
On the right edge of the waveform area, a vertical 10-segment LED-style meter lights up proportionally to the signal strength. Segments are color-coded: green (low), yellow (moderate), orange (high), red (very high).
Waveform Status Bar
The bottom bar of the panel displays:
- Signal — the RMS signal strength as a percentage, color-coded (gray < 20%, green < 50%, orange < 80%, red >= 80%).
- Peak — the peak sample value from the current raw buffer.
- Sample rate and bit depth — shown on the right (e.g. "48kHz 24-bit").
Volume Analysis Panel
The Volume Analysis panel displays a rolling history graph of the audio amplitude over time, functioning like a traditional volume meter.
Time Range Selector
In the panel header, a segmented control lets you choose the time range displayed in the graph:
| Range | Samples |
|---|---|
| 1s | 50 |
| 5s | 250 |
| 10s | 500 |
Volume Graph
The main area renders a filled waveform graph of the amplitude history (up to 60 data points in the rolling buffer). The graph uses a green-to-red gradient fill based on amplitude level, with a subtle glow effect and a mirrored reflection below.
Reference lines are drawn:
- A detailed grid with major lines every 50% and minor lines every 10%.
- Dashed reference lines at 25%, 50%, and 75% amplitude, color-coded by level.
- A percentage scale on the left (0%–100%).
- A time scale on the bottom showing the sample range.
VU Meter Bars
On the right edge of the graph, a vertical 20-segment VU meter fills from bottom to top based on the current amplitude. Segments are color-coded: green (0–50%), yellow (50–75%), orange (75–90%), red (90–100%).
Statistics Bar
At the bottom of the panel, four statistics are displayed side by side:
| Statistic | Description |
|---|---|
| Min | The minimum amplitude in the current waveform history (blue). |
| Max | The maximum amplitude in the current history (red). |
| Average | The mean amplitude across the history buffer (yellow). |
| Now | The most recent amplitude value, color-coded by level. |
Technical Details Panel
The Technical Details panel is a comprehensive dashboard that exposes the full state of the audio engine, audio session, and hardware configuration. All values update every 0.5 seconds while monitoring is active.
Performance Metrics
| Metric | Description |
|---|---|
| Sample Rate | The active audio session sample rate (e.g. "48.0 kHz"). |
| Buffer Size | The audio engine buffer size in frames (e.g. 1024). |
| Input Latency | The input latency reported by the audio session, in milliseconds. Highlighted when latency exceeds 10 ms. |
| IO Buffer | The I/O buffer duration in milliseconds. |
Audio Levels
| Metric | Description |
|---|---|
| Peak Level | The peak amplitude as a percentage. Highlighted red when clipping is detected (above 95%). |
| RMS Level | The root-mean-square amplitude as a percentage. |
| dBFS | Decibels relative to full scale. Highlighted yellow when above -20 dB. |
| Signal Quality | Derived from signal-to-noise ratio: Excellent (SNR > 40 dB), Good (SNR > 20 dB), Fair (SNR > 10 dB), or Poor. |
Device Configuration
| Metric | Description |
|---|---|
| Current Route | The name of the currently active audio input device. |
| Input Channels | The maximum number of input channels available. |
| Polar Pattern | The preferred polar pattern of the input data source (e.g. Omnidirectional). |
Session State
| Metric | Description |
|---|---|
| Engine Status | Running (green) or Stopped (red). |
| Category | The active AVAudioSession category (e.g. PlayAndRecord). |
| Mode | The active audio session mode (e.g. VoiceChat). |
| Options | The active category options (e.g. "BT • Mix"). |
Route Changes
When an audio route change is detected, this section appears showing:
| Metric | Description |
|---|---|
| Last Change | The timestamp of the most recent route change. |
| Reason | The reason for the change: New Device Available, Device Disconnected, Category Changed, Route Override, Wake From Sleep, No Suitable Route, Configuration Change, or Unknown. |
System Information
| Metric | Description |
|---|---|
| Timestamp | The current system time. |
| Samples | The number of samples in the current raw waveform buffer. |
| Uptime | The system uptime in seconds. |
Additional Performance
| Metric | Description |
|---|---|
| Output Latency | The output latency reported by the audio session, in milliseconds. |
| Preferred Rate | The preferred sample rate requested by the tool. |
| Preferred Buffer | The preferred I/O buffer duration requested by the tool, in milliseconds. |
| Preferred Channels | The preferred number of input channels. |
Engine Details
| Metric | Description |
|---|---|
| Input Format | The full AVAudioFormat description of the audio engine's input node (sample rate, channels, bit depth, interleaving). |
| Output Format | The full AVAudioFormat description of the audio engine's output node. |
| Node Count | The number of nodes attached to the audio engine. |
| Max Frames | The manual rendering maximum frame count (shown only when the engine is in manual rendering mode). |
Quality Metrics
| Metric | Description |
|---|---|
| Average Level | The average amplitude across the waveform history buffer. |
| Dynamic Range | The difference between the peak dBFS level and the noise floor (-60 dB reference), in dB. |
| Noise Floor | The RMS level expressed in dBFS, representing the background noise level. |
| Clipping | "Yes" (red, highlighted) if the peak amplitude exceeds 95%, "No" (green) otherwise. |
Session State Details
| Metric | Description |
|---|---|
| Session Active | "Background Audio" if other audio is playing, "Active" otherwise. |
| Audio Hint | "Should Silence" if the system recommends silencing secondary audio, "Can Mix" otherwise. |
Hardware Details
| Metric | Description |
|---|---|
| Max Output Channels | The maximum number of output channels supported. |
| Input Available | Whether audio input hardware is available. |
| Input Gain | The current input gain value (if settable), or N/A. |
| Input Data Source | The name of the active input data source (e.g. "Bottom", "Front", "Back"). |
| System Volume | The current system output volume (0.00–1.00). |
Session Format Info
The raw description of the active input data source, providing the full system-level detail string.
Privacy Disclaimer
At the bottom of the screen, a privacy disclaimer with a shield icon states that no audio data is stored, recorded, or transmitted — all processing happens locally on the device in real time.
Permissions
- Microphone permission — required for all functionality. The system permission prompt appears automatically the first time the audio engine initializes.
- If permission has not been determined, Lirum shows a permission screen with a Grant Access button that triggers the system prompt.
- If permission was previously denied, Lirum shows an Open Settings button to redirect to the iOS Settings app where the user can re-enable microphone access.
Technical Details
- The tool uses AVAudioEngine with an input tap on bus 0 to capture PCM audio buffers. A buffer size of 1024 frames is used.
- The audio session is configured with the
.playAndRecordcategory and.voiceChatmode, with.allowBluetoothand.mixWithOthersoptions enabled. This ensures Bluetooth HFP devices (such as AirPods) are discoverable as input sources. - A preferred I/O buffer duration of 5 ms is requested for responsive visualizations.
- For non-Bluetooth devices, a preferred sample rate of 48 kHz is requested. For Bluetooth HFP devices, the sample rate is left to the system to avoid format conflicts.
- RMS amplitude is calculated from the PCM buffer using the formula:
sqrt(sum(sample^2) / count), then scaled by a factor of 5 and clamped to [0, 1]. - dBFS (decibels relative to full scale) is calculated as
20 * log10(amplitude). - Raw waveform updates are throttled to 60 fps to prevent excessive UI updates.
- The waveform history buffer holds up to 60 data points, processed from the amplitude buffer on each display link frame.
- A CADisplayLink running at up to 120 fps drives the waveform history updates by averaging collected amplitude samples between frames.
- Audio engine details are polled every 0.5 seconds via a timer.
- When switching input devices, the audio engine is fully torn down and recreated with a fresh audio session to ensure the correct format is used. A loading overlay is shown during the transition (minimum 300 ms display time for smooth UX, with a 2-second timeout fallback).
- Bluetooth format handling — for Bluetooth devices, the tap is installed with a
nilformat to let the system choose the appropriate format automatically, avoiding invalid format errors that can occur with HFP devices. - Audio route changes are observed via
AVAudioSession.routeChangeNotification. When a new device appears or an existing device is removed, the tool automatically updates the device list and, if recording, restarts with the best available device. Route changes are throttled (300 ms minimum interval) to prevent restart loops. - Device auto-selection priority: Bluetooth HFP, headset mic, built-in microphone.
- When the tool disappears or the app enters the background, the audio engine is stopped and the audio session is fully deactivated (switched to
.ambientcategory and deactivated with.notifyOthersOnDeactivation) to release the microphone and allow other apps to resume audio playback.
Notes And Limitations
- The tool monitors live audio input levels. It does not record, save, or transmit any audio data.
- When switching input devices, Lirum briefly shows a loading indicator while the audio engine reconfigures. This typically takes less than a second.
- Bluetooth headsets and USB microphones may report different gain levels and sample rates compared to the built-in microphone.
- On Bluetooth HFP devices (e.g. AirPods), the sample rate may be lower (e.g. 16 kHz or 8 kHz) due to the Hands-Free Profile limitations.
- The clipping indicator triggers when amplitude exceeds 95% of full scale. Persistent clipping may indicate the input gain is too high or the sound source is too close to the microphone.
- Audio monitoring stops automatically when the app enters the background or is minimized, ensuring no lingering microphone access.