Use rubberband 3.0 API if available

This commit is contained in:
Robin Gareus 2022-09-13 06:44:41 +02:00
parent a009307a3d
commit be096edd8c
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -1899,8 +1899,13 @@ AudioTrigger::audio_run (BufferSet& bufs, samplepos_t start_sample, samplepos_t
*/
if (!got_stretcher_padding) {
#ifdef HAVE_RUBBERBAND_3_0_0
to_pad = _stretcher->getPreferredStartPad();
to_drop = _stretcher->getStartDelay();
#else
to_pad = _stretcher->getLatency();
to_drop = to_pad;
#endif
got_stretcher_padding = true;
DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 requires %2 padding %3\n", name(), to_pad));
}