1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

AudioProcessorARAExtension: Add support for ARAPlaybackRenderer::AlwaysNonRealtime

This commit is contained in:
Pierre Guillot 2025-02-03 11:24:19 +01:00
parent a381fdf81d
commit abb44599c5
2 changed files with 6 additions and 4 deletions

View file

@ -55,7 +55,8 @@ bool AudioProcessorARAExtension::getTailLengthSecondsForARA (double& tailLength)
bool AudioProcessorARAExtension::prepareToPlayForARA (double sampleRate,
int samplesPerBlock,
int numChannels,
AudioProcessor::ProcessingPrecision precision)
AudioProcessor::ProcessingPrecision precision,
bool alwaysNonRealtime)
{
#if ARA_VALIDATE_API_CALLS
isPrepared = true;
@ -65,10 +66,10 @@ bool AudioProcessorARAExtension::prepareToPlayForARA (double sampleRate,
return false;
if (auto playbackRenderer = getPlaybackRenderer())
playbackRenderer->prepareToPlay (sampleRate, samplesPerBlock, numChannels, precision);
playbackRenderer->prepareToPlay (sampleRate, samplesPerBlock, numChannels, precision, alwaysNonRealtime ? ARAPlaybackRenderer::AlwaysNonRealtime::yes : ARAPlaybackRenderer::AlwaysNonRealtime::no);
if (auto editorRenderer = getEditorRenderer())
editorRenderer->prepareToPlay (sampleRate, samplesPerBlock, numChannels, precision);
editorRenderer->prepareToPlay (sampleRate, samplesPerBlock, numChannels, precision, alwaysNonRealtime ? ARAPlaybackRenderer::AlwaysNonRealtime::yes : ARAPlaybackRenderer::AlwaysNonRealtime::no);
return true;
}

View file

@ -135,7 +135,8 @@ protected:
bool prepareToPlayForARA (double sampleRate,
int samplesPerBlock,
int numChannels,
AudioProcessor::ProcessingPrecision precision);
AudioProcessor::ProcessingPrecision precision,
bool alwaysNonRealtime);
/** Implementation helper for AudioProcessor::releaseResources().