-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added initial changes for iOS support. #69
Conversation
I've tried to use this commit along with RustAudio/coreaudio-sys#33, but compilation failed for me with:
Will this be fixed along with the rust-bindgen fixes you mentioned in RustAudio/coreaudio-sys#33? Is there a workaround you could suggest? Thank you for these PRs! I hope they will be merged soon. |
Hmm. @endragor, I think the issue is resolved with blacklisting I'm seeing this:
The line numbers for the generated bindings will depend a lot on your version of macOS, iOS SDKs, and LLVM version. The different iOS SDKs have different new or deprecated or deleted bits of the objective-c framework headers. I wish I could tell you what I've updated my Anyway, I've been testing this branch out with [package.metadata.bundle.example.sine]
name = "sine"
identifier = "com.coreaudio.rs.sine"
category = "Utility"
short_description = "An example of a bundled application"
long_description = """
A trivial application that just displays a blank window with
a title bar. It serves as an example of an application that
can be bundled with cargo-bundle, as well as a test-case for
cargo-bundle's support for bundling crate examples.
""" But have been having the error of: |
@simlay here's the patch I used of this PR for when I got audio working on bevy -> rodio -> cpal. I trimmed out all unnecessary lines, and I tried to implement the replacement of
|
@MichaelHills Could you push that code to a branch/fork? You've mentioned that you've rebased so applying the raw diff seems error prone. I'm also fine with closing this PR and you can open a new PR. Thoughts? |
I have opened up a draft #72 until I can test the changes. I'll just need to figure out how to exercise this code, perhaps by getting an example going using this crate directly rather than using |
I'd probably publish PRs to For now, given that there's no iOS support for all four crates, I think you should have an example project that builds as part of CI either Closing in favor of #72. @MichaelHills got more context and knows how this works better than I do at this point. |
The only real change here I think is the usage of:
kAudioSessionProperty_CurrentHardwareIOBufferDuration
rather thankAudioDevicePropertyBufferFrameSize
which I found at https://stackoverflow.com/questions/13157523/kaudiodevicepropertybufferframesize-replacement-for-iosMost of these changes are conditional compilation things and mapping the names of the iOS version of the bindings.
This is obviously dependent on RustAudio/coreaudio-sys#33