Skip to content

Commit

Permalink
AAP MIDI ports are regarded as JUCE MIDI ports only if it is not a Sy…
Browse files Browse the repository at this point in the history
…stem port.

It is part of atsushieno/aap-core#187
  • Loading branch information
atsushieno committed Nov 21, 2023
1 parent 5b47062 commit cd9e435
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ void AndroidAudioPluginInstance::processBlock(AudioBuffer<float> &audioBuffer,
bool AndroidAudioPluginInstance::hasMidiPort(bool isInput) const {
for (int i = 0; i < native->getNumPorts(); i++) {
auto p = native->getPort(i);
if (p->getPortDirection() ==
(isInput ? AAP_PORT_DIRECTION_INPUT : AAP_PORT_DIRECTION_OUTPUT) &&
(p->getContentType() == AAP_CONTENT_TYPE_MIDI || p->getContentType() == AAP_CONTENT_TYPE_MIDI2))
if (p->getPortDirection() == (isInput ? AAP_PORT_DIRECTION_INPUT : AAP_PORT_DIRECTION_OUTPUT) &&
(p->getContentType() == AAP_CONTENT_TYPE_MIDI || p->getContentType() == AAP_CONTENT_TYPE_MIDI2) &&
strstr(p->getName(), "System MIDI") == nullptr)
return true;
}
return false;
Expand Down

0 comments on commit cd9e435

Please sign in to comment.