summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_track.cc
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-15 01:43:14 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2016-07-14 21:55:49 -0400
commit8af589b322408aba38413dc2c85dc77ae1c9f2e4 (patch)
treea8b99e1462efe92f6a9c6b40ba9e9f59fb56436b /libs/ardour/midi_track.cc
parentbfc6b6a3ab737da3073d69284b7438bfa65a72ec (diff)
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.
Diffstat (limited to 'libs/ardour/midi_track.cc')
-rw-r--r--libs/ardour/midi_track.cc7
1 files changed, 1 insertions, 6 deletions
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<Delivery> d = boost::dynamic_pointer_cast<Delivery> (*i);
- if (d) {
- d->flush_buffers (nframes);
- }
- }
+ flush_processor_buffers_locked (nframes);
need_butler = diskstream->commit (playback_distance);