fixed audio renderer with new speed system

This commit is contained in:
itsmattkc
2020-01-06 16:16:36 +11:00
parent 402f031be2
commit 464dfb9be0
2 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -52,10 +52,12 @@ NodeValueTable AudioRenderWorker::RenderBlock(const TrackOutput *track, const Ti
if (!samples_from_this_block.isEmpty()) {
// Stretch samples here
if (b->speed() != 1) {
rational abs_speed = qAbs(b->speed());
if (abs_speed != 1) {
QByteArray speed_adjusted_samples;
double clip_speed = b->speed().toDouble();
double clip_speed = abs_speed.toDouble();
int sample_count = audio_params_.bytes_to_samples(samples_from_this_block.size());
+4 -4
View File
@@ -81,10 +81,6 @@ void VideoRenderWorker::HashNodeRecursively(QCryptographicHash *hash, const Node
if (param->type() == NodeParam::kInput) {
NodeInput* input = static_cast<NodeInput*>(param);
// Get time adjustment
// For a single frame, we only care about one of the times
rational input_time = n->InputTimeAdjustment(input, TimeRange(time, time)).in();
if (n->IsBlock()) {
const Block* b = static_cast<const Block*>(n);
@@ -96,6 +92,10 @@ void VideoRenderWorker::HashNodeRecursively(QCryptographicHash *hash, const Node
}
}
// Get time adjustment
// For a single frame, we only care about one of the times
rational input_time = n->InputTimeAdjustment(input, TimeRange(time, time)).in();
if (input->IsConnected()) {
// Traverse down this edge
HashNodeRecursively(hash, input->get_connected_node(), input_time);