mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Fixed an issue in the AAX wrapper where scrubbing in ProTools caused spurious calls to prepareToPlay() from JuceAAX_Processor::process().
This commit is contained in:
parent
7e2860eafa
commit
16cfead473
1 changed files with 14 additions and 3 deletions
|
|
@ -429,7 +429,7 @@ struct AAXClasses
|
|||
public AudioProcessorListener
|
||||
{
|
||||
public:
|
||||
JuceAAX_Processor() : sampleRate (0), lastBufferSize (1024)
|
||||
JuceAAX_Processor() : sampleRate (0), lastBufferSize (1024), maxBufferSize (1024)
|
||||
{
|
||||
pluginInstance = createPluginFilterOfType (AudioProcessor::wrapperType_AAX);
|
||||
pluginInstance->setPlayHead (this);
|
||||
|
|
@ -858,7 +858,17 @@ struct AAXClasses
|
|||
pluginInstance->setPlayConfigDetails (pluginInstance->getNumInputChannels(),
|
||||
pluginInstance->getNumOutputChannels(),
|
||||
sampleRate, bufferSize);
|
||||
pluginInstance->prepareToPlay (sampleRate, bufferSize);
|
||||
|
||||
if (bufferSize > maxBufferSize)
|
||||
{
|
||||
// we only call prepareToPlay here if the new buffer size is larger than
|
||||
// the one used last time prepareToPlay was called.
|
||||
// currently, this should never actually happen, because as of Pro Tools 12,
|
||||
// the maximum possible value is 1024, and we call prepareToPlay with that
|
||||
// value during initialisation.
|
||||
pluginInstance->prepareToPlay (sampleRate, bufferSize);
|
||||
maxBufferSize = bufferSize;
|
||||
}
|
||||
}
|
||||
|
||||
const ScopedLock sl (pluginInstance->getCallbackLock());
|
||||
|
|
@ -962,6 +972,7 @@ struct AAXClasses
|
|||
|
||||
audioProcessor.setPlayConfigDetails (numberOfInputChannels, numberOfOutputChannels, sampleRate, lastBufferSize);
|
||||
audioProcessor.prepareToPlay (sampleRate, lastBufferSize);
|
||||
maxBufferSize = lastBufferSize;
|
||||
|
||||
check (Controller()->SetSignalLatency (audioProcessor.getLatencySamples()));
|
||||
}
|
||||
|
|
@ -973,7 +984,7 @@ struct AAXClasses
|
|||
Array<float*> channelList;
|
||||
int32_t juceChunkIndex;
|
||||
AAX_CSampleRate sampleRate;
|
||||
int lastBufferSize;
|
||||
int lastBufferSize, maxBufferSize;
|
||||
|
||||
struct ChunkMemoryBlock : public ReferenceCountedObject
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue