Not everything is resolved.
Because my plugin is a midi processor PT only lets it launch, without an, if I include {0,0} in the list of input/output possibilities in Projucer.
But then my processBlock() never gets called. because of this code in the AAX wrapper:
file : juce_audio_plugin_client
if (numOuts >= numIns)
{
for (int i = 0; i < numOuts; ++i)
channels[i] = outputs[outputLayoutMap[i]];
for (int i = 0; i < numIns; ++i)
memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
for (int i = numIns; i < numOuts; ++i)
zeromem (channels[i], (size_t) bufferSize * sizeof (float));
process (channels, numOuts, bufferSize, bypass, midiNodeIn, midiNodesOut);
}
else
{
for (int i = 0; i < numOuts; ++i)
channels[i] = outputs[outputLayoutMap[i]];
for (int i = 0; i < numOuts; ++i)
memcpy (channels[i], getAudioBufferForInput (inputs, sidechain, mainNumIns, i), (size_t) bufferSize * sizeof (float));
for (int i = numOuts; i < numIns; ++i)
channels[i] = const_cast<float*> (getAudioBufferForInput (inputs, sidechain, mainNumIns, i));
process (channels, numIns, bufferSize, bypass, midiNodeIn, midiNodesOut);
}
when numIns and numOuts both equal zero then process never gets called.
If I don’t include {0,0} in the input/output scheme in PROJUCER, then protools give an “insufficient resources error” when I try instantiate, and disables my plug.
actually my problem is earlier in that code
void process (const float* const* inputs, float* const* outputs, const int sideChainBufferIdx,
const int bufferSize, const bool bypass,
AAX_IMIDINode* midiNodeIn, AAX_IMIDINode* midiNodesOut,
float* const meterBuffers)
{
auto numIns = pluginInstance->getTotalNumInputChannels();
auto numOuts = pluginInstance->getTotalNumOutputChannels();
auto numMeters = aaxMeters.size();
const ScopedLock sl (pluginInstance->getCallbackLock());
bool isSuspended = [this, sideChainBufferIdx]
{
if (processingSidechainChange)
return true;
bool processWantsSidechain = (sideChainBufferIdx != -1);
if (hasSidechain && canDisableSidechain && (sidechainDesired != processWantsSidechain))
{
sidechainDesired = processWantsSidechain;
processingSidechainChange = true;
triggerAsyncUpdate();
return true;
}
return pluginInstance->isSuspended();
}();
if (isSuspended)
{
for (int i = 0; i < numOuts; ++i)
FloatVectorOperations::clear (outputs[i], bufferSize);
if (meterBuffers != nullptr)
FloatVectorOperations::clear (meterBuffers, numMeters);
}
else
{
auto mainNumIns = pluginInstance->getMainBusNumInputChannels();
auto sidechain = (pluginInstance->getChannelCountOfBus (true, 1) > 0 ? sideChainBufferIdx : -1);
auto numChans = jmax (numIns, numOuts);
if (numChans == 0)
return;
if I comment out
if (numChans == 0)
return;
Then my plugin works, but that’s probably not the right way to go about this?