diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index ac1de28e8d..22d89bdf96 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3390,6 +3390,25 @@ Editor::freeze_route () return; } + if (clicked_routeview->track()->has_external_redirects()) { + MessageDialog d (string_compose (_("%1\n\nThis track has at least one send/insert/return as part of its signal flow.\n\n" + "Freezing will only process the signal as far as the first send/insert/return."), + clicked_routeview->track()->name()), true, MESSAGE_INFO, BUTTONS_NONE, true); + + d.add_button (_("Freeze anyway"), Gtk::RESPONSE_OK); + d.add_button (_("Don't freeze"), Gtk::RESPONSE_CANCEL); + d.set_title (_("Freeze Limits")); + + int response = d.run (); + + switch (response) { + case Gtk::RESPONSE_CANCEL: + return; + default: + break; + } + } + InterThreadInfo itt; current_interthread_info = &itt; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index e8fbc0ed7d..42b74b50bc 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -423,6 +423,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, void sync_order_keys (std::string const &); static PBD::Signal1 SyncOrderKeys; + bool has_external_redirects() const; + protected: friend class Session; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 6f68f172a7..c726aec833 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4039,3 +4039,21 @@ Route::metering_state () const { return MeteringRoute; } + +bool +Route::has_external_redirects () const +{ + for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) { + + /* ignore inactive processors and obviously ignore the main + * outs since everything has them and we don't care. + */ + + if ((*i)->active() && (*i) != _main_outs && (*i)->does_routing()) { + return true;; + } + } + + return false; +} + diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 2f57af4923..934da39fc0 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3969,13 +3969,14 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end, srcs.push_back (fsource); } - /* tell redirects that care that we are about to use a much larger blocksize */ + /* tell redirects that care that we are about to use a much larger + * blocksize. this will flush all plugins too, so that they are ready + * to be used for this process. + */ need_block_size_reset = true; track.set_block_size (chunk_size); - /* XXX need to flush all redirects */ - position = start; to_do = len;