From 57118c2370fa20c737471f5aec7f9a3a55340a64 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 9 Apr 2020 01:28:04 +0200 Subject: [PATCH] Prevent FX from producing sound after export This cuts reverb tails and synth sounds after export. Disabling freewheeling, continues normal processing where export left off. This previously kept notes ringing, or reverbs audible. --- libs/ardour/export_handler.cc | 2 +- libs/ardour/session_export.cc | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index 9454f52e24..4e365bd431 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -314,8 +314,8 @@ ExportHandler::process_timespan (samplecnt_t samples) export_status->current_postprocessing_cycle = 0; } else { finish_timespan (); - return 0; } + return 1; /* trigger realtime_stop() */ } return 0; diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index d66be3ada3..79e0b5a51b 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -239,7 +239,10 @@ Session::process_export (pframes_t nframes) try { /* handle export - XXX what about error handling? */ - ProcessExport (nframes); + if (ProcessExport (nframes).value_or (0) > 0) { + /* last cycle completed */ + flush_all_inserts (); + } } catch (std::exception & e) { error << string_compose (_("Export ended unexpectedly: %1"), e.what()) << endmsg;