mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-09-10 23:54:10 +00:00
NaN/Inf from any JS caller (audio:setGain does no validation) previously reached the gain atomics raw; a NaN master gain multiplies the whole device output to NaN and poisons the peak meters (TLC deep-read §2). Clamp at the four setters — the single choke point covering the legacy facade, the source-indexed API, and the audio-effects executor. Bounds 0..32 match the executor's clampGain (Phase 0.b compat pin); stream/ renderer-bus keep their historical 0..8 via the same JUCE-free helper, now testable in the new tests/engine_units target (Phase 0.c harness). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
823 B
CMake
22 lines
823 B
CMake
# Tests for the sandbox IPC path. The audio-ring loopback is cross-platform;
|
|
# the control-channel + posix_spawn smoke tests are POSIX-only (see
|
|
# tests/sandbox/CMakeLists.txt). Built by default alongside the addon — opt-out
|
|
# with -DSLOPSMITH_BUILD_TESTS=OFF.
|
|
#
|
|
# Run from the build directory: `ctest --output-on-failure -C Release`.
|
|
|
|
option(SLOPSMITH_BUILD_TESTS "Build sandbox unit tests" ON)
|
|
|
|
if(NOT SLOPSMITH_BUILD_TESTS)
|
|
return()
|
|
endif()
|
|
|
|
# Pure-helper tests (no JUCE / no platform deps) build everywhere.
|
|
add_subdirectory(audio_sanitize)
|
|
add_subdirectory(engine_units)
|
|
|
|
# Note: enable_testing() lives in the top-level CMakeLists.txt — calling it
|
|
# only here would register tests in build/tests/CTestTestfile.cmake but
|
|
# `ctest` from the root build directory wouldn't discover them.
|
|
add_subdirectory(sandbox)
|