mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 14:15:46 +01:00
VST3: Ignore MIDI channel count for a bus
Assume that simply the presence of an Event bus indicates that MIDI is supported. This fixes Arturia synths, among others. see also https://forum.juce.com/t/vst3-event-bus-channel-count/25051
This commit is contained in:
parent
68ee66a4ee
commit
86be01c0f9
2 changed files with 13 additions and 2 deletions
|
|
@ -1386,11 +1386,17 @@ VST3PI::count_channels (Vst::MediaType media, Vst::BusDirection dir, Vst::BusTyp
|
|||
bool is_sidechain = (type == Vst::kAux) && (dir == Vst::kInput);
|
||||
|
||||
if (media == Vst::kEvent) {
|
||||
/* MIDI Channel count -> MIDI input */
|
||||
#if 0
|
||||
/* Supported MIDI Channel count (for a single MIDI input) */
|
||||
if (bus.channelCount > 0) {
|
||||
_io_name[media][dir].push_back (Plugin::IOPortDescription (bus_name, is_sidechain));
|
||||
}
|
||||
return std::min<int32> (1, bus.channelCount);
|
||||
#else
|
||||
/* Some plugin leave it at zero, even though they accept events */
|
||||
_io_name[media][dir].push_back (Plugin::IOPortDescription (bus_name, is_sidechain));
|
||||
return 1;
|
||||
#endif
|
||||
} else {
|
||||
for (int32_t j = 0; j < bus.channelCount; ++j) {
|
||||
std::string channel_name;
|
||||
|
|
|
|||
|
|
@ -61,8 +61,13 @@ count_channels (Vst::IComponent* c, Vst::MediaType media, Vst::BusDirection dir,
|
|||
}
|
||||
#endif
|
||||
if (media == Vst::kEvent) {
|
||||
/* MIDI Channel count -> MIDI input */
|
||||
#if 0
|
||||
/* Supported MIDI Channel count (for a single MIDI input) */
|
||||
return std::min<int32> (1, bus.channelCount);
|
||||
#else
|
||||
/* Some plugin leave it at zero, even though they accept events */
|
||||
return 1;
|
||||
#endif
|
||||
} else {
|
||||
n_channels += bus.channelCount;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue