Cut shell/capture comment bloat ~33% (comments only, zero code change)
This commit is contained in:
@@ -1,25 +1,17 @@
|
||||
#pragma once
|
||||
// capture_orchestrator — the single-capture orchestration + the realtime/insert
|
||||
// action bodies (Q-W3 hoist out of main.cpp, T4-02). Owns:
|
||||
// * renderOffline — ONE offline render under the scope's FxBypassGuard (the
|
||||
// stack-RAII out-of-scope FX/fader/pan neutralize, defined in the .cpp —
|
||||
// precision-invariant-critical, shared by single-shot / batch / recapture);
|
||||
// * captureAndIndexOne — render + provenance stamp + bank add + owned-manifest
|
||||
// record, WITHOUT persisting (single-shot persists right after; batch persists
|
||||
// once at the end);
|
||||
// * RunCapture / RunCaptureItemAssign — the bindable single-capture actions;
|
||||
// * RunCaptureRealtimeTrack / RunCancelRealtime — the realtime action bodies
|
||||
// (the in-flight state itself lives in realtime_lifecycle);
|
||||
// * RunInsertSelected — the M6 placement action body (the INTENDED, explicit
|
||||
// placement path — the one deliberate exception to capture-never-places).
|
||||
// Single-capture orchestration + the realtime/insert action bodies: renderOffline
|
||||
// (one offline render under the scope's FxBypassGuard, shared by single-shot/
|
||||
// batch/recapture), captureAndIndexOne (render + provenance + bank add +
|
||||
// owned-manifest record, unpersisted), RunCapture/RunCaptureItemAssign,
|
||||
// RunCaptureRealtimeTrack/RunCancelRealtime (in-flight state lives in
|
||||
// realtime_lifecycle), and RunInsertSelected — the one deliberate exception to
|
||||
// capture-never-places.
|
||||
//
|
||||
// The session is threaded explicitly (no hidden module state): main.cpp's dispatch
|
||||
// passes its ReaSamplerSession. The load-bearing principle holds structurally —
|
||||
// no capture path here calls InsertMedia or touches the arrange/timeline; only
|
||||
// RunInsertSelected places, on purpose, via the insert shell.
|
||||
// The session is threaded explicitly; no capture path here calls InsertMedia
|
||||
// or touches the timeline except RunInsertSelected, on purpose, via the insert shell.
|
||||
//
|
||||
// REAPER-facing: the .cpp includes reaper_plugin_functions.h WITHOUT
|
||||
// REAPERAPI_IMPLEMENT (main.cpp owns the API pointers — CLAUDE.md §contract).
|
||||
// The .cpp includes reaper_plugin_functions.h WITHOUT REAPERAPI_IMPLEMENT
|
||||
// (main.cpp owns the API pointers).
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -34,17 +26,17 @@ class ReaSamplerSession;
|
||||
namespace reasampler::capture {
|
||||
|
||||
// Renders one CaptureRequest through the offline backend under the scope's
|
||||
// FX-bypass guard, returning the backend's CaptureResult. Shared by RunCapture and
|
||||
// RunRecaptureFromSource so the FX-scope neutralize + render recipe lives in ONE
|
||||
// place. Non-destructive; touches no timeline item — it writes a file only.
|
||||
// FX-bypass guard. Shared by RunCapture and RunRecaptureFromSource so the
|
||||
// FX-scope neutralize + render recipe lives in one place. Non-destructive;
|
||||
// writes a file only.
|
||||
CaptureResult renderOffline(CaptureScope scope,
|
||||
const std::vector<MediaTrack*>& sourceTracks,
|
||||
const CaptureRequest& req);
|
||||
|
||||
// Renders ONE capture request under the scope's FX-bypass guard, stamps provenance,
|
||||
// and adds the resulting Sample to the ACTIVE bank + records the created file in
|
||||
// the owned-file manifest — WITHOUT persisting. On success, res.sample.id carries
|
||||
// the LANDED bank-index id (fresh add or hash-dedup collapse target — S8).
|
||||
// Renders one capture request, stamps provenance, adds the Sample to the
|
||||
// active bank + owned-file manifest — without persisting (batch persists once
|
||||
// at the end). res.sample.id carries the landed bank-index id (fresh add or
|
||||
// hash-dedup collapse target).
|
||||
CaptureResult captureAndIndexOne(ReaSamplerSession& session,
|
||||
CaptureScope scope,
|
||||
const ResolvedSource& src,
|
||||
@@ -53,21 +45,21 @@ CaptureResult captureAndIndexOne(ReaSamplerSession& session,
|
||||
double endSeconds);
|
||||
|
||||
// Runs one capture-action-table row: resolve, render + add + record, persist +
|
||||
// mark dirty. Returns the landed bank-index id ("" on failure/no-op) — the S8
|
||||
// capture+assign path consumes it; the plain capture actions ignore it.
|
||||
// mark dirty. Returns the landed bank-index id ("" on failure/no-op) — the
|
||||
// arrange-ingest capture+assign path consumes it; plain capture actions ignore it.
|
||||
std::string RunCapture(ReaSamplerSession& session, const CaptureActionDef& def);
|
||||
|
||||
// S8 arrange ingest: Item-scope capture into the active bank + assignment-request
|
||||
// write, in one undo block.
|
||||
// Item-scope capture into the active bank + assignment-request write, in one
|
||||
// undo block.
|
||||
void RunCaptureItemAssign(ReaSamplerSession& session);
|
||||
|
||||
// STARTS the realtime track capture (async, timer-driven — the in-flight state is
|
||||
// realtime_lifecycle's; OnTimer drives it) / cancels the in-flight one.
|
||||
// Starts the realtime track capture (async, timer-driven — in-flight state is
|
||||
// realtime_lifecycle's) / cancels the in-flight one.
|
||||
void RunCaptureRealtimeTrack(ReaSamplerSession& session);
|
||||
void RunCancelRealtime(ReaSamplerSession& session);
|
||||
|
||||
// Runs the M6 insert: place the bank panel's selected sample(s) at the edit cursor
|
||||
// via the insert shell. `conform` selects the explicit opt-in tempo-match variant.
|
||||
// Places the bank panel's selected sample(s) at the edit cursor via the
|
||||
// insert shell. `conform` selects the explicit opt-in tempo-match variant.
|
||||
void RunInsertSelected(ReaSamplerSession& session, bool conform);
|
||||
|
||||
} // namespace reasampler::capture
|
||||
|
||||
Reference in New Issue
Block a user