summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-30 18:54:47 +0200
committerRobin Gareus <robin@gareus.org>2017-09-30 18:54:47 +0200
commit56edd3767c7e559711289858ded1afa3a5d74816 (patch)
treeab0f93f992e26126aadb1507270dfd995a53549b /libs/ardour/route.cc
parentdec10f2f3c6fffe27e72243d9bf36713d8f084f9 (diff)
NO-OP, re-order code, put all *roll() methods next to each other.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc94
1 files changed, 47 insertions, 47 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 73b3ee7662..0f8c892b24 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3626,47 +3626,14 @@ Route::flush_processor_buffers_locked (samplecnt_t nframes)
}
}
-int
-Route::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing)
-{
- Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
-
- if (!lm.locked()) {
- return 0;
- }
-
- return no_roll_unlocked (nframes, start_sample, end_sample, session_state_changing);
-}
-
-int
-Route::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing)
+void
+Route::flush_processors ()
{
- /* Must be called with the processor lock held */
-
- if (!_active) {
- silence_unlocked (nframes);
- _meter->reset();
- return 0;
- }
-
- if (session_state_changing) {
- if (_session.transport_speed() != 0.0f) {
- /* we're rolling but some state is changing (e.g. our diskstream contents)
- so we cannot use them. Be silent till this is over.
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
- XXX note the absurdity of ::no_roll() being called when we ARE rolling!
- */
- silence_unlocked (nframes);
- _meter->reset();
- return 0;
- }
- /* we're really not rolling, so we're either delivery silence or actually
- monitoring, both of which are safe to do while session_state_changing is true.
- */
+ for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ (*i)->flush ();
}
-
- run_route (start_sample, end_sample, nframes, 0, false, false);
- return 0;
}
samplecnt_t
@@ -3737,21 +3704,54 @@ Route::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample
}
int
-Route::silent_roll (pframes_t nframes, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, bool& /* need_butler */)
+Route::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing)
{
- silence (nframes);
- flush_processor_buffers_locked (nframes);
- return 0;
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
+
+ if (!lm.locked()) {
+ return 0;
+ }
+
+ return no_roll_unlocked (nframes, start_sample, end_sample, session_state_changing);
}
-void
-Route::flush_processors ()
+int
+Route::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing)
{
- Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
+ /* Must be called with the processor lock held */
- for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
- (*i)->flush ();
+ if (!_active) {
+ silence_unlocked (nframes);
+ _meter->reset();
+ return 0;
}
+
+ if (session_state_changing) {
+ if (_session.transport_speed() != 0.0f) {
+ /* we're rolling but some state is changing (e.g. our diskstream contents)
+ so we cannot use them. Be silent till this is over.
+
+ XXX note the absurdity of ::no_roll() being called when we ARE rolling!
+ */
+ silence_unlocked (nframes);
+ _meter->reset();
+ return 0;
+ }
+ /* we're really not rolling, so we're either delivery silence or actually
+ monitoring, both of which are safe to do while session_state_changing is true.
+ */
+ }
+
+ run_route (start_sample, end_sample, nframes, 0, false, false);
+ return 0;
+}
+
+int
+Route::silent_roll (pframes_t nframes, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, bool& /* need_butler */)
+{
+ silence (nframes);
+ flush_processor_buffers_locked (nframes);
+ return 0;
}
#ifdef __clang__