fixed waveform issue
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user