Files
oak-editor/app/render/backend/audio/audiobackend.h
T
itsmattkc e8fddc2d5b improved renderer reliability
The renderer backend can now distinguish between jobs. Previously if two jobs
of the same frame were started (which is legal if the user made a change while
frames were still being rendered), an earlier job in some situations could
finish AFTER a later job, and the backend would have no way of distinguishing
between them. This meant a frame could be erroneously set to an old value
rather than the newest. This commit introduces job identification so that old
jobs are automatically discarded.
2020-01-02 03:21:38 +11:00

38 lines
719 B
C++

#ifndef AUDIOBACKEND_H
#define AUDIOBACKEND_H
#include <QFile>
#include "../audiorenderbackend.h"
class AudioBackend : public AudioRenderBackend
{
Q_OBJECT
public:
AudioBackend(QObject* parent = nullptr);
virtual ~AudioBackend() override;
virtual QIODevice* GetAudioPullDevice() override;
protected:
virtual bool InitInternal() override;
virtual void CloseInternal() override;
virtual bool CompileInternal() override;
virtual void DecompileInternal() override;
virtual void ConnectWorkerToThis(RenderWorker* worker) override;
private slots:
void ThreadCompletedCache(NodeDependency dep, NodeValueTable data, qint64 job_time);
private:
QFile pull_device_;
};
#endif // AUDIOBACKEND_H