cache: streamlined audio into cache task

Since we always cache audio, it makes sense to lump it into the same auto-cache
task we use for everything else.
This commit is contained in:
itsmattkc
2020-05-27 00:09:09 +10:00
parent c907114b17
commit 0c7b3e1761
9 changed files with 133 additions and 100 deletions
+11 -3
View File
@@ -85,7 +85,17 @@ bool ExportTask::Run()
}
// Start render process
Render({range}, mat, params_.audio_enabled(), false);
TimeRangeList video_range, audio_range;
if (params_.video_enabled()) {
video_range.append(range);
}
if (params_.audio_enabled()) {
audio_range.append(range);
}
Render(video_range, audio_range, mat, false);
bool success = true;
@@ -167,8 +177,6 @@ void ExportTask::AudioDownloaded(const TimeRange &range, SampleBufferPtr samples
adjusted_range -= params_.custom_range().in();
}
qDebug() << "Downloaded audio" << adjusted_range;
audio_data_.WritePCM(adjusted_range, samples);
}