tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
tracktion::engine::EditRenderJob Class Reference
Inheritance diagram for tracktion::engine::EditRenderJob:
tracktion::engine::RenderManager::Job tracktion::engine::ThreadPoolJobWithProgress juce::MessageListener juce::Timer juce::ThreadPoolJob

Public Member Functions

 ~EditRenderJob () override
 Destructor.
 
const Renderer::ParametersgetParams () const noexcept
 Returns the parameters in use for this job.
 
juce::AudioThumbnailgetAudioThumbnail ()
 Returns an audio thumbnail that will be updated with the progress of the render operation.
 
bool isMidi () const noexcept
 Returns true if this job is rendering MIDI.
 
Renderer::RenderResultgetResult ()
 Returns the result of this render.
 
juce::String getLastError () const
 
- Public Member Functions inherited from tracktion::engine::RenderManager::Job
JobStatus runJob () override
 Performs the render.
 
float getCurrentTaskProgress () override
 Returns the progress of the job.
 
void cancelJob ()
 Cancels the current job safely making sure any listeners are called appropriately.
 
void cleanUpDanglingJob ()
 Called during app shutdown by the manager on any jobs that haven't had a chance to recieve their async completion callbacks.
 
void incReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
- Public Member Functions inherited from tracktion::engine::ThreadPoolJobWithProgress
 ThreadPoolJobWithProgress (const juce::String &name)
 
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.
 
- Public Member Functions inherited from juce::ThreadPoolJob
 ThreadPoolJob (const String &name)
 
String getJobName () const
 
void setJobName (const String &newName)
 
bool isRunning () const noexcept
 
bool shouldExit () const noexcept
 
void signalJobShouldExit ()
 
void addListener (Thread::Listener *)
 
void removeListener (Thread::Listener *)
 

Static Public Member Functions

static Ptr getOrCreateRenderJob (Engine &, Renderer::Parameters &, bool deleteEdit, bool silenceOnBackup, bool reverse)
 Returns a job that will have been started to generate the Render described by the params.
 
static Ptr getOrCreateRenderJob (Engine &, const AudioFile &destFile, const RenderOptions &, ProjectItemID itemID, bool silenceOnBackup, bool reverse)
 Creates a job based on a set of RenderOptions properties and a source Edit ProjectItemID.
 
- Static Public Member Functions inherited from juce::ThreadPoolJob
static ThreadPoolJobgetCurrentThreadPoolJob ()
 

Protected Member Functions

bool setUpRender () override
 Subclasses should override this to set-up their render process.
 
bool renderNextBlock () override
 During a render process this will be repeatedly called.
 
bool completeRender () override
 This is called once after all the render blocks have completed.
 
void setLastError (const juce::String &)
 
- Protected Member Functions inherited from tracktion::engine::RenderManager::Job
 Job (Engine &, const AudioFile &proxy)
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::RenderManager::Job
using Ptr = juce::ReferenceCountedObjectPtr< Job >
 
- Public Types inherited from juce::ThreadPoolJob
enum  JobStatus
 
- Public Attributes inherited from tracktion::engine::RenderManager::Job
Engineengine
 
AudioFile proxy
 
std::atomic< floatprogress
 
- Public Attributes inherited from juce::ThreadPoolJob
 jobHasFinished
 
 jobNeedsRunningAgain
 

Detailed Description

Definition at line 17 of file tracktion_EditClipRenderJob.h.

Constructor & Destructor Documentation

◆ ~EditRenderJob()

tracktion::engine::EditRenderJob::~EditRenderJob ( )
override

Destructor.

Definition at line 69 of file tracktion_EditClipRenderJob.cpp.

Member Function Documentation

◆ completeRender()

bool tracktion::engine::EditRenderJob::completeRender ( )
overrideprotectedvirtual

This is called once after all the render blocks have completed.

Subclasses should override this to finish off their render by closing files and etc. returning true if everything completed successfully, false otherwise.

Implements tracktion::engine::RenderManager::Job.

Definition at line 157 of file tracktion_EditClipRenderJob.cpp.

◆ getAudioThumbnail()

juce::AudioThumbnail & tracktion::engine::EditRenderJob::getAudioThumbnail ( )

Returns an audio thumbnail that will be updated with the progress of the render operation.

Don't hang onto this however as it is owned by the job and you should create your own thumbnail from the file once the job has finished.

Definition at line 48 of file tracktion_EditClipRenderJob.h.

◆ getLastError()

juce::String tracktion::engine::EditRenderJob::getLastError ( ) const

Definition at line 78 of file tracktion_EditClipRenderJob.cpp.

◆ getOrCreateRenderJob() [1/2]

RenderManager::Job::Ptr tracktion::engine::EditRenderJob::getOrCreateRenderJob ( Engine e,
const AudioFile destFile,
const RenderOptions ro,
ProjectItemID  itemID,
bool  silenceOnBackup,
bool  reverse 
)
static

Creates a job based on a set of RenderOptions properties and a source Edit ProjectItemID.

If this method is used the Edit will be created on the background render thread and be owned by the job.

Definition at line 34 of file tracktion_EditClipRenderJob.cpp.

◆ getOrCreateRenderJob() [2/2]

RenderManager::Job::Ptr tracktion::engine::EditRenderJob::getOrCreateRenderJob ( Engine e,
Renderer::Parameters params,
bool  deleteEdit,
bool  silenceOnBackup,
bool  reverse 
)
static

Returns a job that will have been started to generate the Render described by the params.

To be notified of when the job completes add yourself as a listener. If the deleteEdit argument is true this will delete the Edit once it is done with it. The destFile should be the same as the params.destFile argument and is only provided so the file doesn't get deleted before creation. This job will continue to run until all references to it are deleted. Once this happens the render will be abandoned. If you delete yourself, make sure to unregister as a listener too.

Definition at line 14 of file tracktion_EditClipRenderJob.cpp.

◆ getParams()

const Renderer::Parameters & tracktion::engine::EditRenderJob::getParams ( ) const
noexcept

Returns the parameters in use for this job.

Definition at line 42 of file tracktion_EditClipRenderJob.h.

◆ getResult()

Renderer::RenderResult & tracktion::engine::EditRenderJob::getResult ( )

Returns the result of this render.

Only valid once the job has completed.

Definition at line 57 of file tracktion_EditClipRenderJob.h.

◆ isMidi()

bool tracktion::engine::EditRenderJob::isMidi ( ) const
noexcept

Returns true if this job is rendering MIDI.

This can be used to determine if the AudioThumbnail should be used to generate a thumbnail or some other means.

Definition at line 54 of file tracktion_EditClipRenderJob.h.

◆ renderNextBlock()

bool tracktion::engine::EditRenderJob::renderNextBlock ( )
overrideprotectedvirtual

During a render process this will be repeatedly called.

Return true once all the blocks have completed, false if this needs to be called again.

Implements tracktion::engine::RenderManager::Job.

Definition at line 140 of file tracktion_EditClipRenderJob.cpp.

◆ setLastError()

void tracktion::engine::EditRenderJob::setLastError ( const juce::String e)
protected

Definition at line 84 of file tracktion_EditClipRenderJob.cpp.

◆ setUpRender()

bool tracktion::engine::EditRenderJob::setUpRender ( )
overrideprotectedvirtual

Subclasses should override this to set-up their render process.

Return true if the set-up completed successfully and the rest of the render callbacks should be called, false if there was a problem and the render should be stopped.

Implements tracktion::engine::RenderManager::Job.

Definition at line 91 of file tracktion_EditClipRenderJob.cpp.


The documentation for this class was generated from the following files: