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

VST3: Fix issue where MIDI Logger example VST3 refused to load in Live

This commit is contained in:
reuk 2020-04-26 14:25:38 +01:00
parent d141799a57
commit 6ed49ff74f

View file

@ -219,7 +219,7 @@ class MidiLoggerPluginDemoProcessor : public AudioProcessor,
{
public:
MidiLoggerPluginDemoProcessor()
: AudioProcessor (BusesProperties())
: AudioProcessor (getBusesLayout())
{
state.addChild ({ "uiState", { { "width", 500 }, { "height", 300 } }, {} }, -1, nullptr);
startTimerHz (60);
@ -329,6 +329,13 @@ private:
queue.push (midi);
}
static BusesProperties getBusesLayout()
{
// Live doesn't like to load midi-only plugins, so we add an audio output there.
return PluginHostType().isAbletonLive() ? BusesProperties().withOutput ("out", AudioChannelSet::stereo())
: BusesProperties();
}
ValueTree state { "state" };
MidiQueue queue;
MidiListModel model; // The data to show in the UI. We keep it around in the processor so that