Skip to content
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

Looking to use in iOS and starting with CoreAudio macOS migration #22

Open
cdbattags opened this issue Nov 24, 2019 · 4 comments
Open

Comments

@cdbattags
Copy link

AudioGetCurrentHostTime() and AudioConvertNanosToHostTime(UInt64($0 * 1000000)) don't exist on iOS so we need to use https://developer.apple.com/library/archive/qa/qa1643/_index.html

any idea how we should go about using the CAHostTimeBase obj-c class in order to get this done?

@cdbattags
Copy link
Author

mach_absolute_time() should be a 1 for 1 of AudioGetCurrentHostTime() I believe

@Reiszecke
Copy link

Hey, I couldn't get anything working so I forked kylestew's fork and made some changes

Check out https://github.com/Reiszecke/WebMIDIKit if you haven't found a solution yet.

@adamnemecek
Copy link
Owner

I'll look into this at some point.

@Reiszecke
Copy link

Reiszecke commented Jul 16, 2020

oh you are still active okay :D

My fork isn't clean, at the moment I can't test it as I'm working on something else but basically

  • the Swift.package file needs to be updated
  • manufacturer name doesn't work on iOS
  • the issue opened here had to be adressed
  • the midi.inputs object isn't iteratable which is why I've added the midi.hotfixInputs

and then everything is working. At least it does for my test project.

All these have been addressed in my fork so whenever you find the time for it feel free to make similar changes

Also, I'm apparently too dumb to get the data from a MIDIEvent so I made it public. No idea how you're supposed to use it but the readme refers to a MIDIPacket callback which isn't there anymore.

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

No branches or pull requests

3 participants