LCOV - code coverage report
Current view: top level - src/audio/dsp - wav_loader.h (source / functions) Coverage Total Hit
Test: merged.info Lines: 100.0 % 3 3
Test Date: 2026-06-03 09:13:19 Functions: - 0 0

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <string>
       4              : #include <vector>
       5              : 
       6              : namespace Amplitron {
       7              : 
       8           93 : struct WavData {
       9              :     std::vector<float> samples;  // mono, normalized to [-1, 1]
      10           31 :     int sample_rate = 0;
      11           31 :     int channels = 0;
      12              : };
      13              : 
      14              : // Load a WAV file, mix down to mono, optionally resample to target_sample_rate.
      15              : // Returns empty WavData (samples.empty()) on failure.
      16              : // Caps IR length at max_length_samples if > 0.
      17              : WavData load_wav_file(const std::string& filepath,
      18              :                       int target_sample_rate = 0,
      19              :                       int max_length_samples = 0);
      20              : 
      21              : // Simple linear-interpolation resampler (mono only).
      22              : std::vector<float> resample_linear(const std::vector<float>& input,
      23              :                                    int from_rate, int to_rate);
      24              : 
      25              : } // namespace Amplitron
        

Generated by: LCOV version 2.0-1