use smarter audio cache that can only have partial sections cached

This commit is contained in:
itsmattkc
2022-05-24 16:07:18 -07:00
parent b97c314183
commit 2090d076fe
8 changed files with 75 additions and 532 deletions
+5 -6
View File
@@ -118,12 +118,11 @@ void PreviewAutoCacher::AudioRendered()
SampleBuffer buf = watcher->Get().value<SampleBuffer>();
node->audio_playback_cache()->SetParameters(buf.audio_params());
/*if (node->audio_playback_cache()->IsEnabled()) {
// WritePCM is tolerant to its buffer being null, it will just write silence instead
node->audio_playback_cache()->WritePCM(range,
valid_ranges,
watcher->Get().value<SampleBuffer>());
}*/
// WritePCM is tolerant to its buffer being null, it will just write silence instead
node->audio_playback_cache()->WritePCM(range,
valid_ranges,
watcher->Get().value<SampleBuffer>());
// Detect if this audio was incomplete because it was waiting on a conform to finish
if (watcher->GetTicket()->property("incomplete").toBool()) {