Skip to main content

Module latency_testing

Module latency_testing 

Source
Expand description

Tauri commands that expose latency measurement to the frontend.

Each command in this module is a thin adapter over AudioLatencyMeasurementService. They are responsible for:

  • Locking (or releasing) the AudioService mutex at the right time.
  • Logging results via tracing so they appear in the backend console.
  • Returning serialisable DTOs across the IPC boundary.

§Command overview

CommandTauri invoke nameWhat it measures
test_gain_latencytest_gain_latencyGain processor CPU cost (logs only, no return value)
measure_all_dsp_cpu_timingsmeasure_all_dsp_cpu_timingsCPU cost of all DSP processors
measure_all_dsp_algorithmic_latencymeasure_all_dsp_algorithmic_latencyAlgorithmic (design) delay per processor
measure_buffer_latencymeasure_buffer_latencyI/O buffer delay from stream config
measure_round_trip_latencymeasure_round_trip_latencyTrue end-to-end hardware round-trip

Functions§

measure_all_dsp_algorithmic_latency
Returns the algorithmic (design-inherent) delay for every processor in the DSP chain.
measure_all_dsp_cpu_timings
Measures the CPU execution cost of every processor in the active DSP chain.
measure_buffer_latency
Estimates the I/O buffer latency from the current CPAL stream configuration.
measure_round_trip_latency
Measures true end-to-end round-trip latency using dedicated CPAL streams.
test_gain_latency
Measures the CPU execution impact of the GainProcessor and logs the result.