|
TracktionEngine
|
Task that actually performs the render operation in blocks. More...
#include <tracktion_Renderer.h>
Public Types | |
| using | CancellationCheck = std::function< bool()> |
| A predicate polled to find out whether the render should stop. | |
Public Member Functions | |
| RenderTask (const juce::String &taskDescription, const Renderer::Parameters &, std::atomic< float > *progressToUpdate, juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver *) | |
| Constructs a RenderTask for a set of parameters. | |
| RenderTask (const juce::String &taskDescription, const Renderer::Parameters &, std::unique_ptr< tracktion::graph::Node >, std::unique_ptr< tracktion::graph::PlayHead >, std::unique_ptr< tracktion::graph::PlayHeadState >, std::unique_ptr< ProcessState >, std::atomic< float > *progressToUpdate, juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver *) | |
| Constructs a RenderTask for a set of parameters and existing graph. | |
| ~RenderTask () override | |
| Destructor. | |
| JobStatus | runJob () override |
| Call until this returns jobHasFinished to perform the render. | |
| float | getCurrentTaskProgress () override |
| Returns the current progress of the render. | |
| void | setCancellationCheck (CancellationCheck) |
| Sets an additional predicate used to cancel this render. | |
| bool | shouldCancel () const |
| Returns true if the render should stop. | |
| bool | performNormalisingAndTrimming (const Renderer::Parameters &target, const Renderer::Parameters &intermediate) |
| bool | foldWrapRemainder (const Renderer::Parameters &target, const Renderer::Parameters &intermediate) |
Public Member Functions inherited from engine::ThreadPoolJobWithProgress | |
| ThreadPoolJobWithProgress (const juce::String &name) | |
| ~ThreadPoolJobWithProgress () | |
| virtual bool | canCancel () const |
| void | setManager (BackgroundJobManager &) |
| void | setName (const juce::String &newName) |
| Sets the job's name but also updates the manager so the list will reflect it. | |
| void | prepareForJobDeletion () |
| Call this in your sub-class destructor to to remvoe it from the manager queue before this class's destructor is called which can result in a pure virtual call. | |
Static Public Member Functions | |
| static CancellationCheck | getDefaultCancellationCheck () |
| Returns a predicate which polls whichever of the standard exit mechanisms the calling thread happens to be using. | |
| static void | flushAllPlugins (const Plugin::Array &, double sampleRate, int samplesPerBlock) |
| static void | setAllPluginsRealtime (const Plugin::Array &, bool realtime) |
| static bool | addMidiMetaDataAndWriteToFile (juce::File, juce::MidiMessageSequence, const TempoSequence &) |
Public Attributes | |
| Renderer::Parameters | params |
| The Parameters being used. | |
| juce::String | errorMessage |
| An error message if the render failed to start. | |
Task that actually performs the render operation in blocks.
You should continually call the runJob method until it returns jobHasFinished.
| using engine::Renderer::RenderTask::CancellationCheck = std::function<bool()> |
A predicate polled to find out whether the render should stop.
This is called from whichever thread is driving runJob(), around once per block, so it must be cheap and mustn't block.
| engine::Renderer::RenderTask::RenderTask | ( | const juce::String & | taskDescription, |
| const Renderer::Parameters & | , | ||
| std::atomic< float > * | progressToUpdate, | ||
| juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver * | |||
| ) |
Constructs a RenderTask for a set of parameters.
| engine::Renderer::RenderTask::RenderTask | ( | const juce::String & | taskDescription, |
| const Renderer::Parameters & | , | ||
| std::unique_ptr< tracktion::graph::Node > | , | ||
| std::unique_ptr< tracktion::graph::PlayHead > | , | ||
| std::unique_ptr< tracktion::graph::PlayHeadState > | , | ||
| std::unique_ptr< ProcessState > | , | ||
| std::atomic< float > * | progressToUpdate, | ||
| juce::AudioFormatWriter::ThreadedWriter::IncomingDataReceiver * | |||
| ) |
Constructs a RenderTask for a set of parameters and existing graph.
|
override |
Destructor.
|
override |
Call until this returns jobHasFinished to perform the render.
|
overridevirtual |
Returns the current progress of the render.
Implements engine::ThreadPoolJobWithProgress.
| void engine::Renderer::RenderTask::setCancellationCheck | ( | CancellationCheck | ) |
Sets an additional predicate used to cancel this render.
The standard thread and pool-job exit flags are always checked as well, so this only needs to supply a caller's own flag.
| bool engine::Renderer::RenderTask::shouldCancel | ( | ) | const |
Returns true if the render should stop.
|
static |
Returns a predicate which polls whichever of the standard exit mechanisms the calling thread happens to be using.
Safe to call from any thread.
|
static |
|
static |
|
static |
| bool engine::Renderer::RenderTask::performNormalisingAndTrimming | ( | const Renderer::Parameters & | target, |
| const Renderer::Parameters & | intermediate | ||
| ) |
| bool engine::Renderer::RenderTask::foldWrapRemainder | ( | const Renderer::Parameters & | target, |
| const Renderer::Parameters & | intermediate | ||
| ) |
| Renderer::Parameters engine::Renderer::RenderTask::params |
The Parameters being used.
| juce::String engine::Renderer::RenderTask::errorMessage |
An error message if the render failed to start.