This file documents what the GUI stats/readouts currently show, where each value comes from, and what the wait/drop counters actually mean.
- Focus is the live GUI readout/counter behavior in
misrc_gui. - Definitions below are based on current code paths in:
misrc_tools/misrc_gui/ui/gui_ui.cmisrc_tools/misrc_gui/input/gui_capture.cmisrc_tools/misrc_gui/processing/gui_extract.cmisrc_tools/misrc_gui/output/gui_record.cmisrc_tools/common/buffer_manager.c
- Capture callback writes raw RF into
BUF_CAPTURE_RF. - Extraction thread reads
BUF_CAPTURE_RF, updates sample/clip/peak stats, writes:- display frames to
BUF_DISPLAY - recording data to
BUF_RECORD_A/BUF_RECORD_B(only while recording)
- display frames to
- Writer threads drain
BUF_RECORD_A/Band update recording byte counters.
Rendered in render_status_bar() in misrc_tools/misrc_gui/ui/gui_ui.c.
REC dot + HH:MM:SS- Shown only while recording.
- Time is
GetTime() - recording_start_time.
- Status text (when not recording)
- Shows
app->status_message.
- Shows
Sync: OK/Sync: --- Uses
stream_synced.
- Uses
XX MSPS- From
sample_ratedisplayed as integersample_rate / 1000000.
- From
Samples- Uses
samples_a(channel A sample counter). - Formatted as raw count with
K/M/Gsuffixes.
- Uses
Frames- Uses
frame_count.
- Uses
Missed- Uses
missed_frame_count. - This counter is debounced in GUI capture callback logic: isolated single miss events are suppressed, and only persistent/consecutive miss conditions increment it.
- Uses
Errors- Uses total
error_count. - This counter is debounced in GUI capture callback logic and tracks persistent parser-error events rather than summing every per-line parser error value.
- Uses total
RF Buffer- Percent fill computed from
BUF_CAPTURE_RFringbuffer head/tail.
- Percent fill computed from
Audio Buffer- Percent fill computed from
BUF_CAPTURE_AUDIOringbuffer head/tail.
- Percent fill computed from
Rendered by render_channel_stats() in misrc_tools/misrc_gui/ui/gui_ui.c.
Peak: +X% -Y%- Based on
vu_*.peak_pos/peak_neg(VU peak-hold values, not instantaneous raw ADC values). - Source peaks are derived from extraction stats and then smoothed/held in
gui_app_update_vu_meters().
- Based on
Clip: +N -M- Cumulative clip counts from extraction thread:
- positive clip when sample
>= 2047 - negative clip when sample
<= -2048
- positive clip when sample
- Cumulative clip counts from extraction thread:
RSTbutton- Clears that channel’s clip counters only.
Errors- Displays
error_count_a/error_count_b. - Current code resets these counters at capture start but does not increment them in active processing paths, so they remain
0unless future wiring is added.
- Displays
- During recording only:
RAW: X MB- From
recording_raw_a/recording_raw_b.
- From
FLAC: Y MB(FLAC mode only)- From
recording_compressed_a/recording_compressed_b.
- From
Ratio: Zx(FLAC mode only)raw_bytes / compressed_bytes.
- Recording duration counter is currently in the bottom bar (left side), next to the red record indicator.
- Side channel panels currently carry per-channel recording size stats (
RAW/FLAC/Ratio), not the global timer.
Wait/drop are backpressure metrics tied to ringbuffer write behavior.
In bufmgr_write_begin() (misrc_tools/common/buffer_manager.c):
write_waitsincrements when producer must wait for space.write_dropsincrements when write is dropped (immediate-drop policy or retries exhausted).
So:
- wait = write had to pause because buffer was full.
- drop = write could not be queued and was discarded.
Default policies in misrc_tools/common/buffer_manager.c:
BUF_CAPTURE_RF: wait up to 10 attempts × 5 ms, then drop.BUF_CAPTURE_AUDIO: immediate drop (no waiting).BUF_RECORD_A/B: default 200 × 5 ms, but GUI extract record path overrides this.BUF_DISPLAY: short wait, then drop (display is intentionally lossy). GUI capture callback overrides inmisrc_tools/misrc_gui/input/gui_capture.c(aligned to CLI timing):- RF callback writes use
8 attempts × 1 ms. - Audio callback writes use
8 attempts × 1 ms.
Record-path override in misrc_tools/misrc_gui/processing/gui_extract.c:
s_record_write_policy = immediate-drop (0 wait attempts, 0 ms timeout).- This means recording writes never block extraction; when record buffers are full, record frames are dropped.
gui_app_t has:
rb_wait_countrb_drop_count
Current behavior:
rb_wait_countandrb_drop_countare updated fromBUF_CAPTURE_RFbuffer-manager write stats deltas each callback.- in upstream mode,
rb_drop_countcan also be incremented by parsed hsdaoh overrun messages.
- Capture stop log (
gui_app_stop_capture()):- prints
waitsanddropsfrom app-level counters.
- prints
- Recording stop logs (
gui_record_stop()):- prints recording-session wait/drop totals computed from
BUF_RECORD_A/Bdeltas. - also prints per-buffer
AandBwait/drop deltas.
- prints recording-session wait/drop totals computed from
- Periodic debug log from buffer manager:
- one-line per-buffer fill/wait/drop summary.
- Most counters are monotonic event counts since capture start.
Missedis an event count (“missed at least one frame” events), not an exact per-frame-loss total.MissedandErrorsare intentionally debounced in GUI capture mode to avoid one-off transient spikes from dominating the UI readout.- GUI capture also applies a callback-gap resync guard: if callback timing stalls for >100 ms (for example due to system/display interruptions), parser sync state is reset before continuing so stale parser state does not generate a long burst of follow-on errors.
Peakin side panels is VU peak-hold representation, not raw unsmoothed instantaneous sample.- Buffer percentages are instantaneous snapshot values.
Add GUI images below as needed.