Skip to main content

Category 5 Stress Tests

Our baseline test suite covers 25 failure scenarios that can crash plugins, corrupt audio, or cause unpredictable behavior. Every plugin must pass 100%. These run as Catch2 tests via CTest with bpts_gate labels.

What We Test

RT-Safety Validation

Real-time audio processing cannot allocate memory, acquire locks, or perform unbounded operations. We verify zero violations.

Why it matters: A single allocation on the audio thread can cause dropouts that ruin a recording session. RT violations are the #1 cause of live performance failures.

Parameter Mutation Tests

We test every parameter at:

  • Minimum value
  • Maximum value
  • Zero crossing
  • Rapid changes (10,000 changes/second)
  • Simultaneous multi-parameter changes

Why it matters: DAW automation can change parameters thousands of times per second. Your plugin must handle this gracefully without clicks, pops, or crashes.

NaN/Inf Protection

We verify the audio output never contains NaN (Not a Number) or Inf (Infinity) values, which can damage speakers and crash DAWs. Checked via StressTests::validateBuffer().

Why it matters: NaN propagates through processing chains and can destroy an entire mix. One bad sample corrupts everything downstream.

Memory Leak Detection

Marathon tests run for 1+ hours with continuous parameter automation to detect slow memory leaks.

Why it matters: Memory leaks crash DAWs during long sessions. A producer working on a 4-hour mixing session can't afford a crash at hour 3.

DC Offset Handling

We verify output contains less than 0.001 DC offset (approximately −60dBFS).

Why it matters: DC offset damages speakers, causes clicks when bypassing, and accumulates in processing chains.

Resolved: DC offset detection was added to buffer validation in BPTS v2.2.0, identified through mutation testing.

Complete Test List (25 Tests)

  1. RT-Safety: No allocations on audio thread
  2. RT-Safety: No mutex locks detected
  3. RT-Safety: No unbounded operations
  4. Parameter bounds: Minimum value handling
  5. Parameter bounds: Maximum value handling
  6. Parameter bounds: Zero crossing
  7. Parameter automation: Rapid changes (10k/sec)
  8. Parameter automation: Multi-param simultaneous
  9. NaN detection: Output buffer validation
  10. Inf detection: Output buffer validation
  11. Clipping prevention: Peak limiting verification
  12. DC offset: Output measurement (<0.001)
  13. Memory leaks: 1-hour marathon test
  14. Thread safety: Concurrent parameter changes
  15. Silence handling: All-zero input buffers
  16. Hot signal: +12dBFS input handling
  17. Square wave stress: Nyquist frequency
  18. Impulse response: Dirac delta input
  19. DC input: Constant DC offset input
  20. Buffer size variations: 32 to 4096 samples
  21. Sample rate variations: 44.1kHz to 192kHz
  22. Channel configurations: Mono, stereo, 5.1, 7.1
  23. Bypass consistency: Bit-perfect passthrough
  24. State persistence: Save/load parameter state
  25. Undo/redo: Parameter history validation