Skip to content

MidiInputPort and MidiOutputPort fix#98

Merged
stijnvanbeek merged 2 commits intonapframework:mainfrom
stijnvanbeek:midiinput-fix
Jul 10, 2025
Merged

MidiInputPort and MidiOutputPort fix#98
stijnvanbeek merged 2 commits intonapframework:mainfrom
stijnvanbeek:midiinput-fix

Conversation

@stijnvanbeek
Copy link
Copy Markdown
Contributor

Fixes (backwards compatibility?) problem with ctors in MidiInputPort and MidiOutputPort that causes the pointer to the MidiService not to be set.

@stijnvanbeek stijnvanbeek merged commit b6c5e34 into napframework:main Jul 10, 2025
3 checks passed
@stijnvanbeek stijnvanbeek deleted the midiinput-fix branch July 10, 2025 14:56
@cklosters
Copy link
Copy Markdown
Member

cklosters commented Jul 10, 2025

This bug was introduced here (Make support for accessing midi ports using RtMidi optional in cmake), midiservice.cpp line 41 -> removal of object creators.

@cklosters
Copy link
Copy Markdown
Member

cklosters commented Jul 10, 2025

I'm also missing an assert every time the service if de referenced -> handle should be set on creation or initialization, if not it is a coding error and should be asserted at runtime. Please take that into account for future reference, it helps others spot issues and debug your code.

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