Skip to content

Commit

Permalink
Fix/portindex (#221)
Browse files Browse the repository at this point in the history
* fix port index comparison
  • Loading branch information
defiantnerd committed Feb 11, 2024
1 parent 2a67b5b commit c8ab208
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wrapasauv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,12 +1348,13 @@ UInt32 WrapAsAUV2::GetAudioChannelLayout(AudioUnitScope scope, AudioUnitElement

void WrapAsAUV2::send(const Clap::AUv2::clap_multi_event_t& event)
{
// port index maps back to MIDI out
auto type = event.header.type;
switch (type)
{
case CLAP_EVENT_NOTE_ON:
{
auto portid = 1; // event.note.port_index;
auto portid = event.note.port_index;
for (auto& i : _midi_outports)
{
if (i->_info.id == portid)
Expand All @@ -1366,7 +1367,7 @@ void WrapAsAUV2::send(const Clap::AUv2::clap_multi_event_t& event)
break;
case CLAP_EVENT_NOTE_OFF:
{
auto portid = 1; // event.note.port_index;
auto portid = event.note.port_index;
for (auto& i : _midi_outports)
{
if (i->_info.id == portid)
Expand Down

0 comments on commit c8ab208

Please sign in to comment.