-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why not use MIDIPacketListAdd? #5
Comments
Furthermore, I don't see a reason why |
@Boddlnagg it has been long since I wrote it and don't remember exactly, but my guess is that I was trying to provide some kind of PacketList builder that did not require to know a size for the data buffer beforehand. |
Okay, I tried to read the doucmentation and find examples of CoreMIDI API usage, but unfortunately I still don't understand everything here. A few findings and ideas in no particular order:
I don't know how critical all these "optimizations" really are for MIDI, but in general I feel like a library wrapper should at least allow one to use the API in the most efficient way possible, as long as it's memory safe. The bugs (which might even lead to memory unsafety), however, should definitely be fixed. I have to think again about an API redesign that makes this as simple, yet efficient, as possible. |
I'm working on a PR that enables all of this and fixes several bugs in the current version. It also involves upgrading to the latest version of |
Great explanations, thanks. I think your suggestion makes a lot of sense. I will look into the PR. |
Is there a reason why you did not use
MIDIPacketListAdd
and instead built your ownPacketBuffer
with quite a bit of unsafe code, which might not really be necessary?Maybe I'm missing something, but right now I don't understand it. If there is a good reason, it should at least be documented in the source code.
The text was updated successfully, but these errors were encountered: