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
+6
View File
@@ -199,6 +199,11 @@ public:
return waveform_;
}
QMutex* waveform_lock()
{
return &waveform_lock_;
}
public slots:
void SetTrackName(const QString& name);
@@ -276,6 +281,7 @@ private:
rational queued_length_;
AudioVisualWaveform waveform_;
QMutex waveform_lock_;
private slots:
void BlockConnected(NodeEdgePtr edge);