mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
process effect-automation when bouncing w/processing
This commit is contained in:
parent
8f52bf7d9f
commit
491f3f6e44
4 changed files with 16 additions and 7 deletions
|
|
@ -177,7 +177,7 @@ class LIBARDOUR_API PluginInsert : public Processor
|
||||||
/** details of the match currently being used */
|
/** details of the match currently being used */
|
||||||
Match _match;
|
Match _match;
|
||||||
|
|
||||||
void automation_run (BufferSet& bufs, pframes_t nframes);
|
void automation_run (BufferSet& bufs, framepos_t start, pframes_t nframes);
|
||||||
void connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now = 0);
|
void connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now = 0);
|
||||||
|
|
||||||
void create_automatable_parameters ();
|
void create_automatable_parameters ();
|
||||||
|
|
|
||||||
|
|
@ -791,6 +791,10 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
return _exporting;
|
return _exporting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool bounce_processing() const {
|
||||||
|
return _bounce_processing_active;
|
||||||
|
}
|
||||||
|
|
||||||
/* this is a private enum, but setup_enum_writer() needs it,
|
/* this is a private enum, but setup_enum_writer() needs it,
|
||||||
and i can't find a way to give that function
|
and i can't find a way to give that function
|
||||||
friend access. sigh.
|
friend access. sigh.
|
||||||
|
|
@ -928,6 +932,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
mutable gint processing_prohibited;
|
mutable gint processing_prohibited;
|
||||||
process_function_type process_function;
|
process_function_type process_function;
|
||||||
process_function_type last_process_function;
|
process_function_type last_process_function;
|
||||||
|
bool _bounce_processing_active;
|
||||||
bool waiting_for_sync_offset;
|
bool waiting_for_sync_offset;
|
||||||
framecnt_t _base_frame_rate;
|
framecnt_t _base_frame_rate;
|
||||||
framecnt_t _current_frame_rate; //this includes video pullup offset
|
framecnt_t _current_frame_rate; //this includes video pullup offset
|
||||||
|
|
@ -982,7 +987,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
void process_without_events (pframes_t);
|
void process_without_events (pframes_t);
|
||||||
void process_with_events (pframes_t);
|
void process_with_events (pframes_t);
|
||||||
void process_audition (pframes_t);
|
void process_audition (pframes_t);
|
||||||
int process_export (pframes_t);
|
int process_export (pframes_t);
|
||||||
int process_export_fw (pframes_t);
|
int process_export_fw (pframes_t);
|
||||||
|
|
||||||
void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
|
void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
|
||||||
|
|
|
||||||
|
|
@ -455,13 +455,13 @@ PluginInsert::silence (framecnt_t nframes)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
|
PluginInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t /*end_frame*/, pframes_t nframes, bool)
|
||||||
{
|
{
|
||||||
if (_pending_active) {
|
if (_pending_active) {
|
||||||
/* run as normal if we are active or moving from inactive to active */
|
/* run as normal if we are active or moving from inactive to active */
|
||||||
|
|
||||||
if (_session.transport_rolling()) {
|
if (_session.transport_rolling() || _session.bounce_processing()) {
|
||||||
automation_run (bufs, nframes);
|
automation_run (bufs, start_frame, nframes);
|
||||||
} else {
|
} else {
|
||||||
connect_and_run (bufs, nframes, 0, false);
|
connect_and_run (bufs, nframes, 0, false);
|
||||||
}
|
}
|
||||||
|
|
@ -538,10 +538,10 @@ PluginInsert::get_parameter (Evoral::Parameter param)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginInsert::automation_run (BufferSet& bufs, pframes_t nframes)
|
PluginInsert::automation_run (BufferSet& bufs, framepos_t start, pframes_t nframes)
|
||||||
{
|
{
|
||||||
Evoral::ControlEvent next_event (0, 0.0f);
|
Evoral::ControlEvent next_event (0, 0.0f);
|
||||||
framepos_t now = _session.transport_frame ();
|
framepos_t now = start;
|
||||||
framepos_t end = now + nframes;
|
framepos_t end = now + nframes;
|
||||||
framecnt_t offset = 0;
|
framecnt_t offset = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,7 @@ Session::Session (AudioEngine &eng,
|
||||||
: playlists (new SessionPlaylists)
|
: playlists (new SessionPlaylists)
|
||||||
, _engine (eng)
|
, _engine (eng)
|
||||||
, process_function (&Session::process_with_events)
|
, process_function (&Session::process_with_events)
|
||||||
|
, _bounce_processing_active (false)
|
||||||
, waiting_for_sync_offset (false)
|
, waiting_for_sync_offset (false)
|
||||||
, _base_frame_rate (0)
|
, _base_frame_rate (0)
|
||||||
, _current_frame_rate (0)
|
, _current_frame_rate (0)
|
||||||
|
|
@ -4169,6 +4170,8 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
|
||||||
Glib::Threads::Mutex::Lock lm (_engine.process_lock());
|
Glib::Threads::Mutex::Lock lm (_engine.process_lock());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_bounce_processing_active = true;
|
||||||
|
|
||||||
_engine.main_thread()->get_buffers ();
|
_engine.main_thread()->get_buffers ();
|
||||||
|
|
||||||
/* call tree *MUST* hold route_lock */
|
/* call tree *MUST* hold route_lock */
|
||||||
|
|
@ -4334,6 +4337,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_bounce_processing_active = false;
|
||||||
|
|
||||||
if (need_block_size_reset) {
|
if (need_block_size_reset) {
|
||||||
track.set_block_size (get_block_size());
|
track.set_block_size (get_block_size());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue