Cut core/capture and core/version comment bloat ~45% (comments only, zero code change)

This commit is contained in:
2026-07-29 20:49:23 -04:00
parent 1f24c4b095
commit 12ffe377e5
16 changed files with 475 additions and 991 deletions
+8 -11
View File
@@ -7,14 +7,14 @@ namespace reasampler::capture {
namespace {
// Base target bits (mode&3). We use only 0 (current track) and 1 (new track).
constexpr int kBaseCurrentTrack = 0; // add to current track
constexpr int kBaseNewTrack = 1; // add new track
constexpr int kBaseCurrentTrack = 0;
constexpr int kBaseNewTrack = 1;
// Tempo-conform bits, verbatim from the header doc-comment.
constexpr int kMatchTempo1x = 8; // &8: try to match tempo 1x
constexpr int kMatchTempoHalf = 16; // &16: try to match tempo 0.5x
constexpr int kMatchTempoDbl = 32; // &32: try to match tempo 2x
constexpr int kDontPreservePitch = 64; // &64: don't preserve pitch when matching tempo
constexpr int kMatchTempo1x = 8;
constexpr int kMatchTempoHalf = 16;
constexpr int kMatchTempoDbl = 32;
constexpr int kDontPreservePitch = 64;
} // namespace
@@ -24,8 +24,7 @@ int computeInsertMode(const InsertOptions& opts) {
switch (opts.conform) {
case TempoConform::None:
// No tempo bits: native length, no stretch. (Also never &4.)
return mode;
return mode; // native length, no stretch; never &4
case TempoConform::Ratio1x:
mode |= kMatchTempo1x;
break;
@@ -37,9 +36,7 @@ int computeInsertMode(const InsertOptions& opts) {
break;
}
// Tempo bits are set (conform != None). Add the pitch-shift bit only when the
// caller asked NOT to preserve pitch. When conform == None we already returned
// above, so this can never fire without a tempo bit present.
// Reached only when a tempo bit is set (None already returned above).
if (!opts.preservePitch)
mode |= kDontPreservePitch;