mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added an AudioProcessorPlayer::setMidiOutput() method for forwarding MIDI messages from the AudioProcessor and updated the standalone plugin holder to use this
This commit is contained in:
parent
e763ac3de2
commit
92141bf279
3 changed files with 35 additions and 11 deletions
|
|
@ -88,6 +88,15 @@ void AudioProcessorPlayer::setDoublePrecisionProcessing (bool doublePrecision)
|
|||
}
|
||||
}
|
||||
|
||||
void AudioProcessorPlayer::setMidiOutput (MidiOutput* midiOutputToUse)
|
||||
{
|
||||
if (midiOutput != midiOutputToUse)
|
||||
{
|
||||
const ScopedLock sl (lock);
|
||||
midiOutput = midiOutputToUse;
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void AudioProcessorPlayer::audioDeviceIOCallback (const float** const inputChannelData,
|
||||
const int numInputChannels,
|
||||
|
|
@ -163,6 +172,9 @@ void AudioProcessorPlayer::audioDeviceIOCallback (const float** const inputChann
|
|||
processor->processBlock (buffer, incomingMidi);
|
||||
}
|
||||
|
||||
if (midiOutput != nullptr)
|
||||
midiOutput->sendBlockOfMessagesNow (incomingMidi);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue