pub fn write_analysis_csv(
result: &AnalysisResult,
output_path: &Path,
compensation: Option<&MicrophoneCompensation>,
) -> Result<(), String>Expand description
Write analysis results to CSV file with optional microphone compensation
§Arguments
result- Analysis resultoutput_path- Path to output CSV filecompensation- Optional microphone compensation to apply (inverse)
When compensation is provided, the inverse is applied: the microphone’s SPL deviation is subtracted from the measured SPL to get the true SPL.
CSV format includes all analysis metrics: frequency_hz, spl_db, phase_deg, thd_percent, rt60_ms, c50_db, c80_db, group_delay_ms