Cleanup
publish / publish (push) Successful in 13m11s

This commit is contained in:
khodowany
2026-10-08 02:13:33 -05:00
parent 3aa3a67e5d
commit dc46d83207
3 changed files with 50 additions and 1 deletions
+12 -1
View File
@@ -155,7 +155,18 @@ auto sonus::detail::transport_player::render(std::float32_t *output, std::uint64
return;
}
}
for (auto const &click : state->config.clicks) {
// Retain overlapping tails, but never revisit an expired schedule prefix.
// The cursor is owned by the render thread and needs no allocation or lock.
while (state->first_live_click < state->config.clicks.size()) {
auto const &click = state->config.clicks[state->first_live_click];
auto length = state->samples[click.downbeat ? 0 : 1].size() / channels;
if (click.frame > state->cursor || length > state->cursor - click.frame) {
break;
}
++state->first_live_click;
}
for (auto index = state->first_live_click; index < state->config.clicks.size(); ++index) {
auto const &click = state->config.clicks[index];
if (click.frame >= state->cursor + count) {
break;
}