Skip to content

Fix #37 Flapi not working on MacOS (ports specifically)#49

Open
gavin2059 wants to merge 2 commits into
MaddyGuthridge:mainfrom
gavin2059:fixports
Open

Fix #37 Flapi not working on MacOS (ports specifically)#49
gavin2059 wants to merge 2 commits into
MaddyGuthridge:mainfrom
gavin2059:fixports

Conversation

@gavin2059

@gavin2059 gavin2059 commented Apr 26, 2026

Copy link
Copy Markdown

Addresses issue #37

2-step fix here, although you only need 1 to get it working:

Fix 1: open_ioport for Auto Port Creation
Fix flapi creating ports itself on mac. We need to use the mido function open_ioport instead of open_input and open_output.

From here, the README instructions should work.

Fix 2: IAC Driver Port Name Matching for Manual Port Creation
For Audio MIDI Setup ports to work, we need to edit the open_port function slightly. The current code assumes that the drivers will be named exactly "Flapi XXX" with a number suffix. However, the mac driver created ports are always detected as "IAC Driver Flapi XXX". So this code will never find IAC Driver ports.

After doing this, I was able to connect to IAC ports, or have FLAPI create its own ports, and produce a healthy heartbeat.

image

@gavin2059 gavin2059 changed the title fix ports on mac Fix #37 Flapi not working on MacOS (ports specifically) Apr 26, 2026
@MaddyGuthridge

Copy link
Copy Markdown
Owner

Thanks so much for this contribution! My main concern is that this may (further) break the logic for the Windows side of things. I don't have time to test it myself currently (plus the main branch is in a half-rewritten state), but I'll keep this open in the hope that I have the time to review it in the future.

@gavin2059

Copy link
Copy Markdown
Author

No worries!

I think it should be fine because users have to create ports manually on windows anyways so the open_ioport thing shouldn't affect windows?

open_port changes should be pretty safe too. The only edge case I can think of is if they somehow had a port named IAC Driver Flapi Request/IAC Driver Flapi Response that isn't used for Flapi.

Totally understand where you're coming from tho. Thanks so much for making Flapi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants