diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-15 17:03:07 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-16 02:14:13 +0200 |
commit | 77687519b69f39aaa2354f4c9945958fc1c630fe (patch) | |
tree | 36ed0f367bc81cccaba0ed01d837c56ff2fea072 /libs/ardour/export_handler.cc | |
parent | 6626723880e6d464bf8d59178120d191a8423c93 (diff) |
Refactor TmpFile into an abstract base class
This allows a TmpFile pointer to be either a Sync or Async (Threaded)
writer. As result we must be able to handle both RT and non RT processing.
Still, post-processing (normalization and encoding) should always
happen faster than realtime (freewheeling).
Since jack does not allow a client to change to freewheeling from within
the process-callback, the async-writer disk-thread FileFlushed is used
to initiate post-processing.
Diffstat (limited to 'libs/ardour/export_handler.cc')
-rw-r--r-- | libs/ardour/export_handler.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index 8ca73788dd..d83e2beebb 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -26,6 +26,7 @@ #include "pbd/convert.h" +#include "ardour/audioengine.h" #include "ardour/audiofile_tagger.h" #include "ardour/debug.h" #include "ardour/export_graph_builder.h" @@ -232,7 +233,12 @@ ExportHandler::process (framecnt_t frames) return 0; } else if (normalizing) { Glib::Threads::Mutex::Lock l (export_status->lock()); - return process_normalize (); + if (AudioEngine::instance()->freewheeling ()) { + return process_normalize (); + } else { + // wait until we're freewheeling + return 0; + } } else { Glib::Threads::Mutex::Lock l (export_status->lock()); return process_timespan (frames); |