diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-27 21:11:38 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-27 21:18:12 -0700 |
commit | 5cdeb2401f789e9968a4f1fb775d1dfb3e9f5a77 (patch) | |
tree | 717980cdb1a9e317f3adb3d9d0b604d49de454e0 /libs/ardour/session_transport.cc | |
parent | ca36d7cc2f393705a6ce59973ce2bf39bb9e9e85 (diff) |
add new Session method to return the worst_latency_preroll() value rounded up to the nearest buffer size
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r-- | libs/ardour/session_transport.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index e41eb59a0f..01bdcea7cb 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -1675,6 +1675,12 @@ Session::worst_latency_preroll () const return _worst_output_latency + _worst_input_latency; } +samplecnt_t +Session::worst_latency_preroll_buffer_size_ceil () const +{ + return lrintf (ceil ((_worst_output_latency + _worst_input_latency) / (float) current_block_size) * current_block_size); +} + void Session::unset_play_range () { |