From c06553c2debb67be6cc6ca373020867cf97d2be1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 14 Jun 2021 02:43:23 +0200 Subject: [PATCH] Reset x-run counter after disabling freewheeling --- libs/ardour/export_handler.cc | 1 + libs/ardour/session_export.cc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index ce0bbfff24..033fdd8fde 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -176,6 +176,7 @@ ExportHandler::start_timespan () do { Glib::usleep (AudioEngine::instance()->usecs_per_cycle ()); } while (AudioEngine::instance()->freewheeling ()); + session.reset_xrun_count (); } if (config_map.empty()) { diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 61361de433..a87d07795f 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -216,6 +216,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex process_function = &Session::process_export_fw; /* this is required for ExportGraphBuilder::Intermediate::start_post_processing */ _engine.Freewheel.connect_same_thread (export_freewheel_connection, boost::bind (&Session::process_export_fw, this, _1)); + reset_xrun_count (); return 0; } else { if (_realtime_export) { @@ -226,6 +227,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex _export_rolling = true; export_status->stop = false; _engine.Freewheel.connect_same_thread (export_freewheel_connection, boost::bind (&Session::process_export_fw, this, _1)); + reset_xrun_count (); return _engine.freewheel (true); } } @@ -398,6 +400,7 @@ Session::stop_audio_export () flush_all_inserts (); _export_rolling = false; _butler->schedule_transport_work (); + reset_xrun_count (); return 0; }