Cut shell/capture comment bloat ~33% (comments only, zero code change)
This commit is contained in:
+14
-18
@@ -1,21 +1,17 @@
|
||||
#pragma once
|
||||
// insert — placement of bank samples into the arrange (M6). REAPER-facing shell:
|
||||
// it reads the bank_panel's current selection, resolves each selected sample's
|
||||
// file, and drops it into the arrange at the edit cursor via InsertMedia, wrapped
|
||||
// in an undo block.
|
||||
// Placement of bank samples into the arrange. REAPER-facing shell: reads the
|
||||
// bank_panel's current selection, resolves each selected sample's file, and drops
|
||||
// it into the arrange at the edit cursor via InsertMedia, wrapped in an undo block.
|
||||
//
|
||||
// THE INTENDED PLACEMENT PATH (CONTEXT.md §load-bearing principle): capture NEVER
|
||||
// auto-inserts; `insert` is the deliberate, user-invoked placement act, so it IS
|
||||
// allowed and expected to add items to the arrange. It must only ever run from its
|
||||
// own action — never from a capture path.
|
||||
// The deliberate, user-invoked placement act (root CLAUDE.md §load-bearing
|
||||
// principle: capture never auto-inserts) — must only ever run from its own action,
|
||||
// never from a capture path.
|
||||
//
|
||||
// Non-destructive to the bank: insert references the bank file (adds an arrange
|
||||
// item pointing at it); it never modifies the bank, the bank files, or ext state.
|
||||
// No SILENT time-stretch: conform-to-tempo is an explicit opt-in on the request,
|
||||
// defaulting OFF (native length). See insert_plan for the mode-bit computation.
|
||||
// Non-destructive to the bank: references the bank file, never modifies it or ext
|
||||
// state. No silent time-stretch: conform-to-tempo is an explicit opt-in, defaulting
|
||||
// off (native length) — see insert_plan for the mode-bit computation.
|
||||
//
|
||||
// The header is SDK-free: all REAPER API use lives in insert.cpp. The pure
|
||||
// mode-bit arithmetic lives in insert_plan (unit-tested outside the DAW).
|
||||
// SDK-free header; all REAPER API use lives in insert.cpp.
|
||||
|
||||
#include "core/capture/insert_plan.h"
|
||||
|
||||
@@ -32,16 +28,16 @@ struct InsertRequest {
|
||||
|
||||
// The outcome of an insert action, for the caller to log to the console.
|
||||
enum class InsertStatus {
|
||||
Ok, // one or more samples inserted
|
||||
NoSelection, // the panel had no selection — a no-op (not an error)
|
||||
Ok,
|
||||
NoSelection, // the panel had no selection — a no-op, not an error
|
||||
NoProject, // no saved project, so no resolvable bank dir — no-op
|
||||
NothingResolved, // a selection existed but no sample resolved to a file
|
||||
};
|
||||
|
||||
struct InsertResult {
|
||||
InsertStatus status = InsertStatus::NoSelection;
|
||||
int inserted = 0; // how many samples were actually placed
|
||||
int skipped = 0; // selected-but-unresolvable/unreadable samples skipped
|
||||
int inserted = 0;
|
||||
int skipped = 0; // selected-but-unresolvable/unreadable samples
|
||||
};
|
||||
|
||||
// Runs the insert: reads the bank panel's single focused sample and the user's
|
||||
|
||||
Reference in New Issue
Block a user