pub struct AnalysisMetrics {
pub bass: f32,
pub mid: f32,
pub treb: f32,
pub onset: f32,
pub downbeat_confidence: f32,
pub downbeat_locked: bool,
}Expand description
A snapshot of the analysis side of diagnostics: what the audio is doing,
as against Metrics’s what the renderer is doing.
§Why this is a second struct rather than six more fields on Metrics
Metrics claims, in its doc comment, to mirror the C ABI’s RlxMetrics.
Growing it would either widen the C ABI or quietly make that claim false, and
ADR-0052 chose neither: these values stay native-only, so the split makes
“does not cross the ABI” a property of the type instead of a comment on a
field that a later plan has no reason to read. It follows the standing line
rather than inventing one — no analysis value has ever crossed the boundary
(novelty is already marked native-API-only on the frame itself).
The named cost, from the same ADR: the foobar plugin gets no analysis
diagnostics programmatically — no rlx_get_metrics counterpart, so
nothing on that path can compute a lock rate — and it is the one frontend
that never touches loopback capture. It does get them on screen: this
overlay is core-drawn, so a host setting RLX_DEBUG_OVERLAY paints the same
six rows the standalone’s F3 does (Plan 0049 close review corrected
ADR-0052 on that point; see its Outcome section). If the estimator ever needs
the machine-readable half on that path, RlxMetrics still leads with
struct_size, so the growth is available — behind a superseding ADR.
Exactly the six values Plan 0048 Phase 6 needs to make its two judgements:
whether the normalized levels ride the music, and whether the downbeat
estimator locks. Nothing speculative — the *_raw twins, bpm, bar and
novelty stay off until something asks.
Fields§
§bass: f32Bass level, normalized against its recent peak (ADR-0049).
mid: f32Mid level, normalized against its recent peak.
treb: f32Treble level, normalized against its recent peak.
onset: f32Onset envelope, normalized against its recent peak.
downbeat_confidence: f32The downbeat estimator’s confidence in 0..1 (ADR-0050).
downbeat_locked: boolWhether the bar position came from the estimator rather than the counter fallback. This is the value ADR-0050’s stopping condition needs: from outside the app a wrong lock and the fallback look identical.
Trait Implementations§
Source§impl Clone for AnalysisMetrics
impl Clone for AnalysisMetrics
Source§fn clone(&self) -> AnalysisMetrics
fn clone(&self) -> AnalysisMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnalysisMetrics
impl Debug for AnalysisMetrics
Source§impl Default for AnalysisMetrics
impl Default for AnalysisMetrics
Source§fn default() -> AnalysisMetrics
fn default() -> AnalysisMetrics
Source§impl From<&AnalysisFrame> for AnalysisMetrics
impl From<&AnalysisFrame> for AnalysisMetrics
Source§fn from(frame: &AnalysisFrame) -> Self
fn from(frame: &AnalysisFrame) -> Self
Source§impl PartialEq for AnalysisMetrics
impl PartialEq for AnalysisMetrics
Source§fn eq(&self, other: &AnalysisMetrics) -> bool
fn eq(&self, other: &AnalysisMetrics) -> bool
self and other values to be equal, and is used by ==.