mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 07:06:23 +01:00
fixups for xrun-marker work, now that Region::sample() and Region::length() so not return sample types
This commit is contained in:
parent
6536655a0a
commit
9a9bc3408f
2 changed files with 7 additions and 5 deletions
|
|
@ -1826,11 +1826,13 @@ Region::captured_xruns (XrunPositions& xruns, bool abs) const
|
|||
bool was_empty = xruns.empty ();
|
||||
for (SourceList::const_iterator i = _sources.begin (); i != _sources.end(); ++i) {
|
||||
XrunPositions const& x = (*i)->captured_xruns ();
|
||||
const samplepos_t ss = start_sample();
|
||||
const samplecnt_t ll = length_samples();
|
||||
for (XrunPositions::const_iterator p = x.begin (); p != x.end (); ++p) {
|
||||
if (abs) {
|
||||
xruns.push_back (*p);
|
||||
} else if (*p >= _start && *p < _start + _length) {
|
||||
xruns.push_back (*p - _start);
|
||||
} else if (*p >= ss && *p < ss + ll) {
|
||||
xruns.push_back (*p - ss);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue