mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-19 03:45:47 +01:00
pre-process (silence) before export to flush reverb tails etc.
This commit is contained in:
parent
56c32a1e77
commit
33545e552b
3 changed files with 24 additions and 8 deletions
|
|
@ -1195,8 +1195,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
|||
framepos_t post_export_position;
|
||||
|
||||
bool _exporting;
|
||||
bool _export_started;
|
||||
bool _export_rolling;
|
||||
framepos_t _export_preroll;
|
||||
|
||||
boost::shared_ptr<ExportHandler> export_handler;
|
||||
boost::shared_ptr<ExportStatus> export_status;
|
||||
|
|
|
|||
|
|
@ -204,8 +204,8 @@ Session::Session (AudioEngine &eng,
|
|||
, post_export_sync (false)
|
||||
, post_export_position (0)
|
||||
, _exporting (false)
|
||||
, _export_started (false)
|
||||
, _export_rolling (false)
|
||||
, _export_preroll (0)
|
||||
, _pre_export_mmc_enabled (false)
|
||||
, _name (snapshot_name)
|
||||
, _is_new (true)
|
||||
|
|
|
|||
|
|
@ -73,12 +73,16 @@ Session::pre_export ()
|
|||
}
|
||||
}
|
||||
|
||||
/* make sure we are actually rolling */
|
||||
/* prepare transport */
|
||||
|
||||
realtime_stop (true, true);
|
||||
|
||||
if (get_record_enabled()) {
|
||||
disable_record (false);
|
||||
}
|
||||
|
||||
unset_play_loop ();
|
||||
|
||||
/* no slaving */
|
||||
|
||||
post_export_sync = config.get_external_sync ();
|
||||
|
|
@ -105,7 +109,8 @@ Session::start_audio_export (framepos_t position)
|
|||
if (!_exporting) {
|
||||
pre_export ();
|
||||
}
|
||||
_export_started = false;
|
||||
|
||||
_export_preroll = 10.0 * nominal_frame_rate (); // TODO make configurable
|
||||
|
||||
/* 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
|
||||
|
|
@ -190,8 +195,19 @@ Session::process_export (pframes_t nframes)
|
|||
int
|
||||
Session::process_export_fw (pframes_t nframes)
|
||||
{
|
||||
if (!_export_started) {
|
||||
_export_started = true;
|
||||
if (_export_preroll > 0) {
|
||||
|
||||
_engine.main_thread()->get_buffers ();
|
||||
fail_roll (nframes);
|
||||
_engine.main_thread()->drop_buffers ();
|
||||
|
||||
_export_preroll -= std::min ((framepos_t)nframes, _export_preroll);
|
||||
|
||||
if (_export_preroll > 0) {
|
||||
// clear out buffers (reverb tails etc).
|
||||
return 0;
|
||||
}
|
||||
|
||||
set_transport_speed (1.0, 0, false);
|
||||
butler_transport_work ();
|
||||
g_atomic_int_set (&_butler->should_do_transport_work, 0);
|
||||
|
|
@ -199,9 +215,9 @@ Session::process_export_fw (pframes_t nframes)
|
|||
return 0;
|
||||
}
|
||||
|
||||
_engine.main_thread()->get_buffers ();
|
||||
_engine.main_thread()->get_buffers ();
|
||||
process_export (nframes);
|
||||
_engine.main_thread()->drop_buffers ();
|
||||
_engine.main_thread()->drop_buffers ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue