restart non-RT locate if a new request has been processed by RT context since we...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 4 Jul 2017 16:14:33 +0000 (12:14 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 18 Sep 2017 15:40:53 +0000 (11:40 -0400)
libs/ardour/session_transport.cc

index b9e8714d17c5107276a5e0edc08520648f0dda92..4a81e0e798a265238f3c9e81d3dd22dde1dbc7cf 100644 (file)
@@ -584,9 +584,24 @@ Session::non_realtime_locate ()
 
        {
                boost::shared_ptr<RouteList> rl = routes.reader();
+
+         restart:
+               const framepos_t tf = _transport_frame;
+
+               cerr << "\n\n >>> START Non-RT locate on routes to " << tf << "\n\n";
+
                for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
                        (*i)->non_realtime_locate (_transport_frame);
+                       if (tf != _transport_frame) {
+                               /* new locate request arrived while processing
+                                  this one. start over.
+                               */
+                               cerr << "\n\n\n\n RESTART LOCATE @ " << _transport_frame << endl;
+                               goto restart;
+                       }
                }
+
+               cerr << "\n\n <<< DONE Non-RT locate on routes\n\n";
        }
        {
                VCAList v = _vca_manager->vcas ();