mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
Temporal: extend timecnt_t API to provide samples() method, using thread-local sample rate
This commit is contained in:
parent
791e76290d
commit
b0a732e636
1 changed files with 2 additions and 1 deletions
|
|
@ -280,7 +280,8 @@ class LIBTEMPORAL_API timecnt_t {
|
|||
|
||||
Temporal::TimeDomain time_domain () const { return _position.time_domain (); }
|
||||
|
||||
superclock_t superclocks() const { if (_position.is_superclock()) return _distance.val(); return compute_superclocks(); }
|
||||
superclock_t superclocks() const { if (_position.is_superclock()) return _distance.val(); return compute_superclocks(); }
|
||||
int64_t samples() const { return superclock_to_samples (superclocks(), _thread_sample_rate); }
|
||||
Temporal::Beats beats () const { if (_position.is_beats()) return Beats::ticks (_distance.val()); return compute_beats(); }
|
||||
int64_t ticks () const { if (_position.is_beats()) return _distance.val(); return compute_ticks(); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue