From 5cd5041b6a28d66fe2fb9dae508956d97bba5a99 Mon Sep 17 00:00:00 2001 From: w1n5t0n Date: Wed, 29 Apr 2026 16:12:12 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20NoOpEngine=20engine=5Fid=20=E2=86=92=20'?= =?UTF-8?q?thru'=20to=20match=20sound=5Fanalysis=5Fmidi=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stream 3's NoOpEngine used engine_id()=='noop' but the schema for sound_analysis_midi.json declares engine_id: 'thru' (matches firmware's ThruAudioApp naming). The class name stays NoOpEngine — it accurately describes what process() does — but the schema-facing identifier is now 'thru'. BreakOr/Elysiamorf compose NoOpEngine by type, not engine_id, so they're unaffected. --- nisps/engines/base.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nisps/engines/base.hpp b/nisps/engines/base.hpp index 8b0f777..3ae1295 100644 --- a/nisps/engines/base.hpp +++ b/nisps/engines/base.hpp @@ -2,10 +2,12 @@ // implementations. // // Includes: -// - NoOpEngine: a silent passthrough used by sequencer-only modes -// (BreakOr, Elysiamorf). Their actual behaviour (MIDI/I2C event emission) -// lives in the engine wrapper outside the audio path; `process()` returns -// zeros so the audio driver has something to consume. +// - NoOpEngine: silent passthrough. Two uses: +// (1) the standalone "thru" engine for the SoundAnalysisMIDI mode (audio +// is analysed but not synthesised), exposed via engine_id()=="thru"; +// (2) composed inside sequencer-only engines (BreakOr, Elysiamorf) whose +// MIDI/I2C event emission lives outside the audio path. Internal +// composition uses the type directly, not the engine_id lookup. // - Helper macros / static_asserts to verify each concrete engine satisfies // `nisps::AudioEngine` at compile time. @@ -24,7 +26,7 @@ namespace nisps { class NoOpEngine { public: static constexpr std::size_t param_count() noexcept { return 0u; } - static constexpr std::string_view engine_id() noexcept { return "noop"; } + static constexpr std::string_view engine_id() noexcept { return "thru"; } void setup(float /*sample_rate*/) noexcept {} void set_params(std::span /*params*/) noexcept {}