Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions framework/vst/internal/vstaudioclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,13 @@ void VstAudioClient::updateProcessSetup()
setup.sampleRate = m_outputSpec.sampleRate;

if (processor->setupProcessing(setup) != Steinberg::kResultOk) {
m_isProcessingSetUp = false;
return;
}

setUpProcessData();
flushBuffers();
m_isProcessingSetUp = true;

ensureActivity();
}
Expand Down Expand Up @@ -551,6 +553,13 @@ void VstAudioClient::ensureActivity()
return;
}

//! NOTE: The plugin may finish loading after the track has already been
//! switched on (e.g. right before an export). Activating it before
//! setupProcessing() would let process() run without output buffers
if (!m_isProcessingSetUp) {
return;
}

IAudioProcessorPtr processor = pluginProcessor();
if (!processor) {
return;
Expand Down
1 change: 1 addition & 0 deletions framework/vst/internal/vstaudioclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class VstAudioClient

bool m_needUnprepareProcessData = false;
bool m_needUpdateState = false;
bool m_isProcessingSetUp = false;

PluginType m_type = PluginType::Undefined;
audio::OutputSpec m_outputSpec;
Expand Down