fixed waveform issue

This commit is contained in:
itsmattkc
2021-08-01 17:10:45 -07:00
parent be4a18d7de
commit 391534b71d
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -143,6 +143,9 @@ void AudioVisualWaveform::OverwriteSums(const AudioVisualWaveform &sums, const r
// Get our source sample
int their_start_index = time_to_samples(offset, rate_dbl);
if (their_start_index >= their_arr.size()) {
continue;
}
// Determine how much we're copying
int copy_len = their_arr.size() - their_start_index;
+1 -1
View File
@@ -203,7 +203,7 @@ void PreviewAutoCacher::AudioRendered()
foreach (TimeRange r, intersections) {
// For each range, adjust it relative to the block and write it
r -= block->in();
block->waveform().OverwriteSums(waveform_info.waveform, r.in(), r.in(), r.length());
block->waveform().OverwriteSums(waveform_info.waveform, r.in(), r.in() - waveform_info.range.in(), r.length());
}
emit block->PreviewChanged();