Vapor: work-around stem export alignment
This is a somewhat fragile solution to ensure that processor reset happens in the same cycle in which the actual data arrives at the start of the cycle.
This commit is contained in:
parent
77e7470270
commit
42dc033636
@ -398,6 +398,13 @@ SurroundReturn::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_
|
||||
}
|
||||
|
||||
if (_sync_and_align) {
|
||||
if (!_rolling && start_sample != end_sample) {
|
||||
samplecnt_t latency_preroll = _session.remaining_latency_preroll ();
|
||||
if (nframes + playback_offset () <= latency_preroll) {
|
||||
end_sample = start_sample;
|
||||
speed = 0;
|
||||
}
|
||||
}
|
||||
if (!_rolling && start_sample != end_sample) {
|
||||
_delaybuffers.flush ();
|
||||
_surround_processor->deactivate();
|
||||
@ -420,6 +427,8 @@ SurroundReturn::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_
|
||||
|
||||
bool with_bed = _with_bed;
|
||||
|
||||
samplecnt_t latency = effective_latency ();
|
||||
|
||||
bufs.set_count (_configured_output);
|
||||
_surround_bufs.silence (nframes, 0);
|
||||
|
||||
@ -438,7 +447,6 @@ SurroundReturn::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_
|
||||
}
|
||||
|
||||
timepos_t unused_start, unused_end;
|
||||
samplecnt_t latency = effective_latency ();
|
||||
|
||||
for (uint32_t s = 0; s < ss->bufs ().count ().n_audio (); ++s, ++cid) {
|
||||
|
||||
|
@ -6,23 +6,9 @@ ardour {
|
||||
}
|
||||
|
||||
function factory () return function ()
|
||||
-- ignore input systemic latency, no additional pre-roll
|
||||
-- to fill buffers with input.
|
||||
for r in Session:get_tracks():iter() do
|
||||
r:input():disconnect_all (nil)
|
||||
end
|
||||
|
||||
-- make surround-return announce additional latency to the next 512
|
||||
-- cycle boundary (and delay the output accordingly).
|
||||
Session:surround_master():surround_return():set_sync_and_align (true)
|
||||
|
||||
-- Mixbus: enforce latency pre-roll to be >= 1505 (latency of Atmos renderer)
|
||||
-- this allows the Stem Export the Surround Bus.
|
||||
-- (Mixbus tracks are aligned to master-out, not surrround out)
|
||||
if Session:master_out().ch_post then
|
||||
Session:master_out():ch_post ():to_latent():set_user_latency (1505)
|
||||
end
|
||||
|
||||
end end
|
||||
|
||||
function icon (params) return function (ctx, width, height, fg)
|
||||
|
Loading…
Reference in New Issue
Block a user