Name captures after their source track: label and filename both, on every interactive mint site, and show the name on the panel card
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "core/model/bank_model.h"
|
||||
#include "core/capture/capture_name.h" // CaptureName — label + file-stem base
|
||||
#include "core/capture/render_settings.h" // TailMode — the three-state tail contract
|
||||
|
||||
// Forward-declared, never dereferenced here — only the REAPER-facing .cpp touches these.
|
||||
@@ -60,6 +61,15 @@ struct CaptureRequest {
|
||||
// backend caller so the pure naming logic stays testable.
|
||||
std::string baseName = "capture";
|
||||
std::string uniqueTag;
|
||||
|
||||
// The label the bank shows, which may legitimately differ from the file stem: the
|
||||
// stem must survive sanitizeStem, the label carries the source name verbatim. Empty
|
||||
// means "the stem base is also the label" — what a caller that names nothing else gets.
|
||||
std::string displayName;
|
||||
|
||||
// The one home for that fallback rule; both backends populate Sample::displayName
|
||||
// from here rather than each spelling the condition out.
|
||||
std::string label() const { return displayName.empty() ? baseName : displayName; }
|
||||
};
|
||||
|
||||
// Every failure is an explicit code, never a thrown exception across the REAPER boundary.
|
||||
@@ -100,6 +110,14 @@ public:
|
||||
// backend's family marker ("" offline, "rt-" realtime).
|
||||
std::string makeUniqueTag(const std::string& prefix);
|
||||
|
||||
// Composes one capture's label + file-stem base (core/capture/capture_name) from the
|
||||
// resolved source-track names, reading the LOCAL clock for the discriminator — the one
|
||||
// impure step, kept here so the composition itself stays pure and tested. `ordinal` is a
|
||||
// batch unit's number (0 for a single capture); `fallback` is the scope literal, used
|
||||
// only when no source name resolved.
|
||||
CaptureName captureNameFor(const std::vector<std::string>& sourceNames,
|
||||
int ordinal, const std::string& fallback);
|
||||
|
||||
// Stamps the metadata shared by both backends onto `s`: trackGuids + channelCount
|
||||
// (echoed from the request), resolved sampleRate (request rate, else PROJECT_SRATE
|
||||
// from `rateProj`), captureTempo, the capture-start time signature
|
||||
|
||||
Reference in New Issue
Block a user