put back revised version of Route::has_external_redirects() and use it to give a...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 16 Mar 2012 16:51:54 +0000 (16:51 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 16 Mar 2012 16:51:54 +0000 (16:51 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11707 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_ops.cc
libs/ardour/ardour/route.h
libs/ardour/route.cc
libs/ardour/session.cc

index ac1de28e8d8da218c29a4c9ea5e2d9a0b128e140..22d89bdf96f83d07b8b77cb2d7753267d0ea6ad8 100644 (file)
@@ -3390,6 +3390,25 @@ Editor::freeze_route ()
                return;
        }
 
+       if (clicked_routeview->track()->has_external_redirects()) {
+               MessageDialog d (string_compose (_("<b>%1</b>\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;
 
index e8fbc0ed7df9024a565d752a29ea665eb82724b6..42b74b50bcbb4a248b3f168e3621f6ce922b7182 100644 (file)
@@ -423,6 +423,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        void sync_order_keys (std::string const &);
        static PBD::Signal1<void,std::string const &> SyncOrderKeys;
 
+       bool has_external_redirects() const;
+
   protected:
        friend class Session;
 
index 6f68f172a7c94d735b019656d94185f3b8b63216..c726aec8334440c0f48493509a1d0f6434c88c3f 100644 (file)
@@ -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;
+}
+
index 2f57af4923f402cded3e1d95bfdb67ae47c529e6..934da39fc09b5eb9c9e97d55880d23e39fb93191 100644 (file)
@@ -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;