mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 23:25:43 +01:00
Add API to check for ongoing de-click
This commit is contained in:
parent
e48fe0fd42
commit
522f28b3c5
4 changed files with 22 additions and 3 deletions
|
|
@ -93,9 +93,7 @@ public:
|
|||
void playlist_modified ();
|
||||
void reset_tracker ();
|
||||
|
||||
bool declick_in_progress () const {
|
||||
return _declick_amp.gain() != 0; // declick-out
|
||||
}
|
||||
bool declick_in_progress () const;
|
||||
|
||||
static void set_midi_readahead_samples (samplecnt_t samples_ahead) { midi_readahead = samples_ahead; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1647,6 +1647,7 @@ private:
|
|||
int start_midi_thread ();
|
||||
|
||||
bool should_ignore_transport_request (TransportRequestSource, TransportRequestType) const;
|
||||
bool declick_in_progress () const;
|
||||
|
||||
void set_play_loop (bool yn, double speed);
|
||||
void unset_play_loop ();
|
||||
|
|
|
|||
|
|
@ -463,6 +463,14 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
|||
// DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 reader run, needs butler = %2\n", name(), _need_butler));
|
||||
}
|
||||
|
||||
bool
|
||||
DiskReader::declick_in_progress () const {
|
||||
/* TODO use an atomic-get.
|
||||
* this may be called from the butler thread
|
||||
*/
|
||||
return _declick_amp.gain() != 0; // declick-out
|
||||
}
|
||||
|
||||
bool
|
||||
DiskReader::pending_overwrite () const {
|
||||
return g_atomic_int_get (&_pending_overwrite) != 0;
|
||||
|
|
|
|||
|
|
@ -578,6 +578,18 @@ Session::non_realtime_overwrite (int on_entry, bool& finished)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Session::declick_in_progress () const
|
||||
{
|
||||
boost::shared_ptr<RouteList> rl = routes.reader();
|
||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||
if (tr && tr->declick_in_progress ()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Session::non_realtime_locate ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue