Reset x-run counter after disabling freewheeling

This commit is contained in:
Robin Gareus 2021-06-14 02:43:23 +02:00
parent d6a1a64398
commit c06553c2de
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 0 deletions

View File

@ -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()) {

View File

@ -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;
}