cache: add passthroughs to allow shallow copies of data

This commit is contained in:
itsmattkc
2022-06-06 20:06:43 -07:00
parent dfc401b63c
commit eeea16c5c3
11 changed files with 223 additions and 59 deletions
+11
View File
@@ -98,4 +98,15 @@ rational AudioWaveformCache::length() const
return len;
}
void AudioWaveformCache::SetPassthrough(PlaybackCache *cache)
{
AudioWaveformCache *c = static_cast<AudioWaveformCache*>(cache);
waveforms_ = c->waveforms_;
for (const TimeRange &r : c->GetValidatedRanges()) {
Validate(r);
}
SetParameters(c->GetParameters());
SetSavingEnabled(c->IsSavingEnabled());
}
}