diff options
author | Robin Gareus <robin@gareus.org> | 2020-01-29 01:22:48 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-01-29 01:32:06 +0100 |
commit | 6bc4f69c5c85a2494dab3936d121833b1dcca15a (patch) | |
tree | 43067fa6fc844991c16f64577972cf3bb7819006 /libs/ardour/ardour/disk_writer.h | |
parent | eb7297e2fc9dd553d36095dd4441a06e793d318a (diff) |
Fix loop recording alignment
DiskWriter::transport_looped() is called from the session
when engine loops. This does not take local disk-reader run()
latency offset into account.
finish_capture() needs to be postponed until the disk-writer
itself reaches the loop-position. This is achieved by
postponing loop() and calling it once loop-length of samples
has been captured.
This works because engaging loop always seeks to the loop-position
and first loop resets _capture_captured.
Diffstat (limited to 'libs/ardour/ardour/disk_writer.h')
-rw-r--r-- | libs/ardour/ardour/disk_writer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/ardour/disk_writer.h b/libs/ardour/ardour/disk_writer.h index c17c2e539e..fab54e2404 100644 --- a/libs/ardour/ardour/disk_writer.h +++ b/libs/ardour/ardour/disk_writer.h @@ -169,6 +169,8 @@ private: void check_record_status (samplepos_t transport_sample, double speed, bool can_record); void finish_capture (boost::shared_ptr<ChannelList> c); + void loop (samplepos_t); + CaptureInfos capture_info; mutable Glib::Threads::Mutex capture_info_lock; @@ -187,6 +189,9 @@ private: volatile gint _num_captured_loops; samplepos_t _accumulated_capture_offset; + bool _transport_looped; + samplepos_t _transport_loop_sample; + boost::shared_ptr<SMFSource> _midi_write_source; std::list<boost::shared_ptr<Source> > _last_capture_sources; |