renderer: move waveform generation into worker and mutex the waveform

Addresses scheduling issues where a backend might be closed (or even
destroyed) before it processes a waveform signal from a worker. Requires
extra multithreading code.
This commit is contained in:
itsmattkc
2020-06-05 15:18:14 +10:00
parent ddf63b39e1
commit de3288893d
7 changed files with 59 additions and 51 deletions
@@ -99,6 +99,8 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
painter->setPen(QColor(64, 64, 64));
TrackOutput* track = TrackOutput::TrackFromBlock(block_);
if (track) {
QMutexLocker locker(track->waveform_lock());
AudioVisualWaveform::DrawWaveform(painter,
rect().toRect(),
this->GetScale(),