Crate audio_processor_testing_helpers

Source
Expand description

Provides helpers for testing audio processors.

  • Drawing charts from a vector with plotters - charts
  • Getting asset paths relative to the crate being tested - relative_path!
  • Comparing floats - assert_f_eq
  • Calculating RMS - rms_level
  • Generating sine buffers - sine_buffer
  • Generating frequency response charts - charts

Modules§

charts
Draw charts with plotters during unit-testing.

Macros§

assert_f_eq
Compare two floats are equal using f32::EPSILON
relative_path
Get a path relative to the root directory (the one with Cargo.toml) of the current crate.

Structs§

Oscillator

Functions§

oscillator_buffer
Create a sine wave buffer with this duration
rms_level
Get RMS level for a buffer
saw_generator
sine_buffer
Create a sine wave buffer with this duration
sine_generator
square_generator
test_level_equivalence
Test two buffers have equivalent RMS levels