Skip to content

Commit 2f1a841

Browse files
committed
refactor(processor): extract metrics types and functions to analyzer_metrics.go
Move metrics-related concerns from analyzer.go into a focused sub-file to reduce cognitive load and improve code organisation. This extraction includes all spectral and interval metrics types, accumulator structures, and their associated extraction and helper functions. - Extract SpectralMetrics, baseMetadataAccumulators, metadataAccumulators, outputMetadataAccumulators, IntervalSample, intervalAccumulator, and intervalFrameMetrics types to analyzer_metrics.go - Move extraction functions: extractSpectralMetrics(), extractFrameMetadata(), extractIntervalFrameMetrics(), extractOutputFrameMetadata(), finalizeOutputMeasurements() - Move helper functions: getFloatMetadata(), linearRatioToDB(), linearSampleToDBFS(), frameSumSquaresAndPeak() - Relocate all metaKey* constants to new file Signed-off-by: Martin Wimpress <code@wimpress.io>
1 parent f8ddcf8 commit 2f1a841

2 files changed

Lines changed: 997 additions & 989 deletions

File tree

0 commit comments

Comments
 (0)