Introduce getPreferredStartPad(), deprecate getLatency() and replace with getStartDelay(); document and test both

This commit is contained in:
Chris Cannam
2022-07-05 17:53:36 +01:00
parent 31984af826
commit 72654b04ea
8 changed files with 255 additions and 70 deletions

View File

@@ -726,11 +726,11 @@ int main(int argc, char **argv)
bool clipping = false;
// The stretcher only pads the start in offline mode; to avoid
// a fade in at the start, we pad it manually in RT mode
int toDrop = 0;
// a fade in at the start, we pad it manually in RT mode. Both
// of these functions are defined to return zero in offline mode
int toDrop = ts.getStartDelay();
if (realtime) {
toDrop = int(ts.getLatency());
int toPad = int(round(toDrop * frequencyshift));
int toPad = ts.getPreferredStartPad();
if (debug > 0) {
cerr << "padding start with " << toPad
<< " samples in RT mode, will drop " << toDrop