move rt-stop to route
authorRobin Gareus <robin@gareus.org>
Wed, 8 Nov 2017 17:05:04 +0000 (18:05 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 9 Jul 2018 15:30:38 +0000 (17:30 +0200)
currently this is only used to resolve midi events for plugins
(this is conceptually not correct, note offs should be resolved by
the disk-reader only), but it calls into all processors now (incl
disk-reader if present), which is handy (e.g. flush delaylins)

libs/ardour/ardour/route.h
libs/ardour/ardour/track.h
libs/ardour/route.cc
libs/ardour/track.cc

index bd283d27ac60d44b04d67c3ccd40db2a66113ac5..d3a4a5d35f9d66f95d3dda8d70fd6e7287e74f63 100644 (file)
@@ -150,8 +150,9 @@ public:
 
        virtual bool can_record() { return false; }
 
-       virtual void non_realtime_transport_stop (samplepos_t now, bool flush);
-       virtual void realtime_handle_transport_stopped () {}
+       void non_realtime_transport_stop (samplepos_t now, bool flush);
+       void realtime_handle_transport_stopped ();
+
        virtual void realtime_locate () {}
        virtual void non_realtime_locate (samplepos_t);
        void set_loop (ARDOUR::Location *);
index b1700fb382955426b3ed7b43964411a3e8402e7f..148fec652d0d9088491ff38c25ad9c29b57e2763 100644 (file)
@@ -139,7 +139,6 @@ public:
        int can_internal_playback_seek (samplecnt_t);
        int internal_playback_seek (samplecnt_t);
        void non_realtime_locate (samplepos_t);
-       void realtime_handle_transport_stopped ();
        void non_realtime_speed_change ();
        int overwrite_existing_buffers ();
        samplecnt_t get_captured_samples (uint32_t n = 0) const;
index fab5beb7667a6f74f8fb1bc6385d49a6eed90638..fba39744fad23a5ceae76b6df8865ba30d7a8810 100644 (file)
@@ -3412,6 +3412,18 @@ Route::non_realtime_transport_stop (samplepos_t now, bool flush)
        }
 }
 
+void
+Route::realtime_handle_transport_stopped ()
+{
+       Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
+
+       /* currently only by Plugin, queue note-off events */
+       for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+               (*i)->realtime_handle_transport_stopped ();
+       }
+}
+
+
 void
 Route::input_change_handler (IOChange change, void * /*src*/)
 {
index d992aae079dea1610be0427f79b071a7c0fa5bcd..072ae27d0842127ae987bcc9626b2053ceb6dd50 100644 (file)
@@ -542,20 +542,6 @@ Track::transport_looped (samplepos_t p)
        return _disk_writer->transport_looped (p);
 }
 
-void
-Track::realtime_handle_transport_stopped ()
-{
-       Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
-
-       if (!lm.locked ()) {
-               return;
-       }
-
-       for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
-               (*i)->realtime_handle_transport_stopped ();
-       }
-}
-
 void
 Track::transport_stopped_wallclock (struct tm & n, time_t t, bool g)
 {