summaryrefslogtreecommitdiff
path: root/libs/ardour/session_export.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-17 21:34:40 +0200
committerRobin Gareus <robin@gareus.org>2016-10-17 21:35:00 +0200
commit3e32a00a52908ab034c55ec4adb705165e3a54d8 (patch)
tree66927e4a7a2decea5c3ed468db1e1b62fa107517 /libs/ardour/session_export.cc
parent551eea452b1aad05a27fc64e07b0a031912d0866 (diff)
fast region export -- don't call process()
Diffstat (limited to 'libs/ardour/session_export.cc')
-rw-r--r--libs/ardour/session_export.cc41
1 files changed, 28 insertions, 13 deletions
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc
index 463f504411..23172838d0 100644
--- a/libs/ardour/session_export.cc
+++ b/libs/ardour/session_export.cc
@@ -104,15 +104,19 @@ Session::pre_export ()
/** Called for each range that is being exported */
int
-Session::start_audio_export (framepos_t position, bool realtime)
+Session::start_audio_export (framepos_t position, bool realtime, bool region_export)
{
if (!_exporting) {
pre_export ();
}
_realtime_export = realtime;
+ _region_export = region_export;
- if (realtime) {
+ if (region_export) {
+ _export_preroll = 0;
+ }
+ else if (realtime) {
_export_preroll = nominal_frame_rate ();
} else {
_export_preroll = Config->get_export_preroll() * nominal_frame_rate ();
@@ -134,6 +138,10 @@ Session::start_audio_export (framepos_t position, bool realtime)
*/
_export_latency = worst_track_latency ();
+ if (region_export) {
+ _export_latency = 0;
+ }
+
/* We're about to call Track::seek, so the butler must have finished everything
up otherwise it could be doing do_refill in its thread while we are doing
it here.
@@ -197,19 +205,26 @@ Session::process_export (pframes_t nframes)
stop_audio_export ();
}
- if (_export_rolling) {
- if (!_realtime_export) {
- /* make sure we've caught up with disk i/o, since
- * we're running faster than realtime c/o JACK.
- */
- _butler->wait_until_finished ();
- }
+ /* for Region Raw or Fades, we can skip this
+ * RegionExportChannelFactory::update_buffers() does not care
+ * about anything done here
+ */
+ if (!_region_export) {
+ if (_export_rolling) {
+ if (!_realtime_export) {
+ /* make sure we've caught up with disk i/o, since
+ * we're running faster than realtime c/o JACK.
+ */
+ _butler->wait_until_finished ();
+ }
- /* do the usual stuff */
+ /* do the usual stuff */
- process_without_events (nframes);
- } else if (_realtime_export) {
- fail_roll (nframes); // somehow we need to silence _ALL_ output buffers
+ process_without_events (nframes);
+
+ } else if (_realtime_export) {
+ fail_roll (nframes); // somehow we need to silence _ALL_ output buffers
+ }
}
try {