NO-OP, re-order code, put all *roll() methods next to each other.
This commit is contained in:
parent
dec10f2f3c
commit
56edd3767c
@ -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)
|
||||
void
|
||||
Route::flush_processors ()
|
||||
{
|
||||
Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
|
||||
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
|
||||
|
||||
if (!lm.locked()) {
|
||||
return 0;
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
(*i)->flush ();
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
/* 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.
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
samplecnt_t
|
||||
@ -3736,6 +3703,49 @@ Route::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample
|
||||
return 0;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
/* 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.
|
||||
|
||||
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 */)
|
||||
{
|
||||
@ -3744,16 +3754,6 @@ Route::silent_roll (pframes_t nframes, samplepos_t /*start_sample*/, samplepos_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
Route::flush_processors ()
|
||||
{
|
||||
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
|
||||
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
(*i)->flush ();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
__attribute__((annotate("realtime")))
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user