13
0

Update route API for silent processing

This commit is contained in:
Robin Gareus 2022-06-03 22:43:14 +02:00
parent 191fdfda72
commit 57a1dbb375
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 7 additions and 15 deletions

View File

@ -152,7 +152,7 @@ public:
int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing);
int silent_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
int silence (pframes_t);
virtual bool declick_in_progress () const { return false; }
virtual bool can_record() { return false; }
@ -684,8 +684,7 @@ protected:
int configure_processors (ProcessorStreams*);
void silence (samplecnt_t);
void silence_unlocked (samplecnt_t);
void silence_unlocked (pframes_t);
ChanCount processor_max_streams;
ChanCount processor_out_streams;

View File

@ -3328,19 +3328,20 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const*
return true;
}
void
Route::silence (samplecnt_t nframes)
int
Route::silence (pframes_t nframes)
{
Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked()) {
return;
return 1;
}
silence_unlocked (nframes);
return 0;
}
void
Route::silence_unlocked (samplecnt_t nframes)
Route::silence_unlocked (pframes_t nframes)
{
/* Must be called with the processor lock held */
@ -4054,14 +4055,6 @@ Route::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_
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;
}
void
Route::update_send_delaylines ()
{