TracktionEngine
Loading...
Searching...
No Matches
engine::RenderManager Class Reference

Manages a set of reference counted render jobs and can be used to retrieve matching jobs or create new ones. More...

#include <tracktion_RenderManager.h>

Inherits juce::DeletedAtShutdown, and juce::AsyncUpdater.

Classes

class  Job
 The base class that all generator jobs derive from. More...

Public Member Functions

 RenderManager (Engine &)
 ~RenderManager () override
void cleanUp ()
 Cleans up any remaining jobs - should be called before the manager is deleted.
Job::Ptr getRenderJobWithoutCreating (const AudioFile &audioFile)
 This will return a Ptr to an existing render job for an audio file or nullptr if no job is in progress.
juce::ReferenceCountedArray< Job > getRenderJobsWithoutCreating (const AudioFile &)
 Returns all the jobs that may be processing the given file.
int getNumJobs () noexcept
 Returns the number of jobs in the pool.
bool isProxyBeingGenerated (const AudioFile &proxyFile) noexcept
 Returns true if a render is currently being performed for this AudioFile.
float getProportionComplete (const AudioFile &proxyFile, float defaultVal) noexcept
 Returns true if a render is currently being performed for this AudioFile.

Static Public Member Functions

static AudioFile getAudioFileForHash (Engine &, const juce::File &directory, HashCode hash)
 Returns the AudioFile for a particular hash.
static juce::StringRef getFileRenderPrefix ()
 Returns the prefix used for render files.

Public Attributes

Engine & engine

Detailed Description

Manages a set of reference counted render jobs and can be used to retrieve matching jobs or create new ones.

Constructor & Destructor Documentation

◆ RenderManager()

engine::RenderManager::RenderManager ( Engine & )

◆ ~RenderManager()

engine::RenderManager::~RenderManager ( )
override

Member Function Documentation

◆ cleanUp()

void engine::RenderManager::cleanUp ( )

Cleans up any remaining jobs - should be called before the manager is deleted.

◆ getAudioFileForHash()

AudioFile engine::RenderManager::getAudioFileForHash ( Engine & ,
const juce::File & directory,
HashCode hash )
static

Returns the AudioFile for a particular hash.

If this is not valid you should then start a new job using getOrCreateRenderJob. You should always check this first, never start a new job unnecessarily.

◆ getRenderJobWithoutCreating()

Job::Ptr engine::RenderManager::getRenderJobWithoutCreating ( const AudioFile & audioFile)

This will return a Ptr to an existing render job for an audio file or nullptr if no job is in progress.

Referenced by engine::ReverseRenderJob::getOrCreateRenderJob(), and engine::WarpTimeRenderJob::getOrCreateRenderJob().

◆ getRenderJobsWithoutCreating()

juce::ReferenceCountedArray< Job > engine::RenderManager::getRenderJobsWithoutCreating ( const AudioFile & )

Returns all the jobs that may be processing the given file.

◆ getNumJobs()

int engine::RenderManager::getNumJobs ( )
noexcept

Returns the number of jobs in the pool.

◆ getFileRenderPrefix()

juce::StringRef engine::RenderManager::getFileRenderPrefix ( )
static

Returns the prefix used for render files.

References getFileRenderPrefix().

Referenced by getFileRenderPrefix().

◆ isProxyBeingGenerated()

bool engine::RenderManager::isProxyBeingGenerated ( const AudioFile & proxyFile)
noexcept

Returns true if a render is currently being performed for this AudioFile.

◆ getProportionComplete()

float engine::RenderManager::getProportionComplete ( const AudioFile & proxyFile,
float defaultVal )
noexcept

Returns true if a render is currently being performed for this AudioFile.

Member Data Documentation

◆ engine

Engine& engine::RenderManager::engine

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