block: reimplemented reversing

This commit is contained in:
itsmattkc
2021-04-12 11:05:45 +10:00
parent da9cdbd29e
commit 7701e9331f
3 changed files with 47 additions and 11 deletions
+4 -1
View File
@@ -226,7 +226,6 @@ NodeValueTable RenderProcessor::GenerateBlockTable(const Track *track, const Tim
continue;
}
// FIXME: Doesn't handle reversing
double speed_value = b->GetStandardValue(Block::kSpeedInput).toDouble();
if (qIsNull(speed_value)) {
@@ -237,6 +236,10 @@ NodeValueTable RenderProcessor::GenerateBlockTable(const Track *track, const Tim
samples_from_this_block->speed(speed_value);
}
if (b->GetStandardValue(Block::kReverseInput).toBool()) {
samples_from_this_block->reverse();
}
int copy_length = qMin(max_dest_sz, samples_from_this_block->sample_count());
// Copy samples into destination buffer