Closed adamnemecek closed 2 years ago
Hi @adamnemecek, sorry for the late response, I completely missed this issue. I'm wondering if you are still interested in this topic. If so, I see that you mention that code would be cleaner with it, are there any other advantages? What implications would it have for the clients of the API? Thanks
Hi @adamnemecek , I'm updating the crate to support MIDI 2, where using blocks as you suggested is the only way. I'm wondering if you could share your prototype with me, no matter in which state it is. I hope it reaches you on time 🙏
It's been a while since I touched this but there's a crate called block which lets you use objective-c blocks from rust.
I think that this should work mostly
@adamnemecek I appreciate your time, thanks 😉
I have a working solution in #36 so I will close this issue.
Hey Christian, you would be interested in a PR that adds the
block
crate and replaces calls toMIDIInputPortCreate
with a call toMIDIInputPortCreateWithBlock
and call toMIDIClientCreate
with call toMIDIClientCreateWithBlock
. It would make the codebase easier to understand. I just tried a basic proof of concept and it seems to work.