Prevent accumulating events during freewheel export
When exporting many ranges, locate and restarting transport for every ranged a SessionEvent::TransportStateChange event is queued. Since freewheel export does not process events. Those events can accumulate: https://discourse.ardour.org/t/pipewire-jack-export-freeze/107383/18?u=x42 During export those requests can be safely ignored because the only purpose is to emit a TransportStateChange() signal when the playhead passes a given location and notify the UI.
This commit is contained in:
parent
baeb5cbafd
commit
ef2c1d990b
@ -346,6 +346,16 @@ Session::process_export_fw (pframes_t nframes)
|
|||||||
butler_completed_transport_work ();
|
butler_completed_transport_work ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
SessionEvent* ev;
|
||||||
|
while (pending_events.read (&ev, 1) == 1) {
|
||||||
|
merge_event (ev);
|
||||||
|
}
|
||||||
|
/* remove TransportStateChange events (which otherwise accumulate with each exported range) */
|
||||||
|
ev = new SessionEvent (SessionEvent::TransportStateChange, SessionEvent::Clear, SessionEvent::Immediate, 0, 0);
|
||||||
|
merge_event (ev);
|
||||||
|
}
|
||||||
|
|
||||||
if (_remaining_latency_preroll > 0) {
|
if (_remaining_latency_preroll > 0) {
|
||||||
samplepos_t remain = std::min ((samplepos_t)nframes, _remaining_latency_preroll);
|
samplepos_t remain = std::min ((samplepos_t)nframes, _remaining_latency_preroll);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user