some ripple behavior fixes

This commit is contained in:
itsmattkc
2019-09-21 01:01:15 +10:00
parent 885aee97a2
commit d0d4756129
8 changed files with 45 additions and 6 deletions
+12
View File
@@ -147,6 +147,18 @@ NodeOutput* TrackOutput::track_output()
return track_output_;
}
Block *TrackOutput::NearestBlockBefore(const rational &time)
{
foreach (Block* block, block_cache_) {
// Blocks are sorted by time, so the first Block who's out point is at/after this time is the correct Block
if (block->out() >= time) {
return block;
}
}
return nullptr;
}
Block *TrackOutput::NearestBlockAfter(const rational &time)
{
foreach (Block* block, block_cache_) {