From 8af589b322408aba38413dc2c85dc77ae1c9f2e4 Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Fri, 15 Jul 2016 01:43:14 +0200 Subject: Consolidate delivery buffer flushing of all route types Route::no_roll(), Route::roll(), Track::no_roll(), AudioTrack::roll() and MidiTrack::roll() all had the exact same loop for flushing buffers of their Delivery processors. That was a lot of replicated code that had to be kept synchronised by hand. Put that code into a protected method Route::flush_processor_buffers_locked() which is called instead. --- libs/ardour/midi_track.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libs/ardour/midi_track.cc') diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index c96254eeb2..b79a1cf52c 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -444,12 +444,7 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame process_output_buffers (bufs, start_frame, end_frame, nframes, declick, (!diskstream->record_enabled() && !_session.transport_stopped())); - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr d = boost::dynamic_pointer_cast (*i); - if (d) { - d->flush_buffers (nframes); - } - } + flush_processor_buffers_locked (nframes); need_butler = diskstream->commit (playback_distance); -- cgit v1.2.3