feat(capture): offline auto/manual tail via pure TailMode mapping

Add TailMode{None,Auto,Manual} + derived -72dB TRIMEND + 8s cap in render_settings;
wire into OfflineRenderBackend with snapshot/restore of the tail settings; add
CAPTURE_ITEM_TAIL/CAPTURE_TRACK_TAIL variant actions (plain actions stay exact-bounds).
This commit is contained in:
2026-07-23 17:08:24 -04:00
parent 92762e2b6c
commit 2d225258b4
6 changed files with 313 additions and 63 deletions
+8 -4
View File
@@ -20,6 +20,7 @@
#include <vector>
#include "bank_model.h"
#include "render_settings.h" // TailMode (pure) — the three-state tail contract
// MediaTrack is forward-declared (like track_guid.h) so this header stays
// REAPER-free while RealtimeRecordBackend::begin can take the resolved source
@@ -64,10 +65,13 @@ struct CaptureRequest {
// it stays source-agnostic, driven entirely by the request).
std::vector<std::string> trackGuids;
// Render tail. Default OFF for the spike (exact bounds, no added silence —
// precision invariant). M7 makes this bindable.
bool renderTail = false;
double tailMs = 0.0;
// Render tail (docs/product/capture-tail.md §The three tail states). Default
// None: exact bounds, no added silence — the precision invariant, and the only
// mode valid for null-test / verify captures. `tailMs` is meaningful ONLY for
// TailMode::Manual (clamped to the 8 s cap by the pure mapping); Auto uses the
// 8 s cap + -72 dB trim internally, None ignores it.
TailMode tailMode = TailMode::None;
double tailMs = 0.0;
// Output format. 0 sampleRate => follow project rate (deterministic: the
// project rate is fixed for a given project).