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/audio_track.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libs/ardour/audio_track.cc') diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 8f83c19161..3a653a0efe 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -394,12 +394,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram process_output_buffers (bufs, start_frame, end_frame, nframes, declick, (!diskstream->record_enabled() && _session.transport_rolling())); - 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