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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user