mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
update disk writer input latency at transport stop
This commit is contained in:
parent
0fc0455fb0
commit
c4f9f53f8c
3 changed files with 14 additions and 9 deletions
|
|
@ -88,7 +88,7 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
bool can_record();
|
||||
|
||||
void set_latency_compensation (framecnt_t);
|
||||
|
||||
void update_latency_information ();
|
||||
enum FreezeState {
|
||||
NoFreeze,
|
||||
Frozen,
|
||||
|
|
@ -151,7 +151,6 @@ class LIBARDOUR_API Track : public Route, public Recordable
|
|||
void ensure_input_monitoring (bool);
|
||||
bool destructive () const;
|
||||
std::list<boost::shared_ptr<Source> > & last_capture_sources ();
|
||||
void set_capture_offset ();
|
||||
std::string steal_write_source_name ();
|
||||
void reset_write_sources (bool, bool force = false);
|
||||
float playback_buffer_load () const;
|
||||
|
|
|
|||
|
|
@ -5730,7 +5730,7 @@ Session::graph_reordered ()
|
|||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||
if (tr) {
|
||||
tr->set_capture_offset ();
|
||||
tr->update_latency_information ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6929,7 +6929,7 @@ Session::post_capture_latency ()
|
|||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||
if (tr) {
|
||||
tr->set_capture_offset ();
|
||||
tr->update_latency_information ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7038,7 +7038,7 @@ Session::update_latency_compensation (bool force_whole_graph)
|
|||
if (!tr) {
|
||||
continue;
|
||||
}
|
||||
tr->set_capture_offset ();
|
||||
tr->update_latency_information ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7371,8 +7371,8 @@ Session::auto_connect_thread_run ()
|
|||
/* this is only used for updating plugin latencies, the
|
||||
* graph does not change. so it's safe in general.
|
||||
* BUT..
|
||||
* .. update_latency_compensation () entails set_capture_offset()
|
||||
* which calls Diskstream::set_capture_offset () which
|
||||
* .. update_latency_compensation () entails Track::update_latency_information()
|
||||
* which calls DiskWriter::set_capture_offset () which
|
||||
* modifies the capture offset... which can be a proplem
|
||||
* in "prepare_to_stop"
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -627,9 +627,15 @@ Track::last_capture_sources ()
|
|||
}
|
||||
|
||||
void
|
||||
Track::set_capture_offset ()
|
||||
Track::update_latency_information ()
|
||||
{
|
||||
_disk_writer->set_capture_offset ();
|
||||
Glib::Threads::RWLock::ReaderLock lr (_processor_lock);
|
||||
framecnt_t chain_latency = _input->latency ();
|
||||
|
||||
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p) {
|
||||
(*p)->set_input_latency (chain_latency);
|
||||
chain_latency += (*p)->signal_latency ();
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue