Render in place: a track's output to a new sibling, source to the bench

This commit is contained in:
2026-08-02 14:17:55 -04:00
parent a0fd931dcb
commit 5c0f5f1591
21 changed files with 727 additions and 32 deletions
+13
View File
@@ -86,4 +86,17 @@ CaptureName composeCaptureName(const CaptureNameInputs& in) {
return out;
}
std::string captureTrackName(const std::string& sourceName) {
const std::string prefix(kCaptureTrackPrefix);
// A source with no readable name yields the bare word rather than a trailing
// space; both spellings are fixed points, which is what makes the whole function
// one (a track named exactly "Capture" must not become "Capture Capture").
const std::string bare = prefix.substr(0, prefix.size() - 1);
if (sourceName.empty()) return bare;
if (sourceName == bare) return sourceName;
if (sourceName.rfind(prefix, 0) == 0) return sourceName;
return prefix + sourceName;
}
} // namespace reasampler::capture