Skip to content

Commit

Permalink
Refactor coreaudio host and add iOS support + ios-feedback example
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHills committed Oct 17, 2020
1 parent a777589 commit ce7a2a0
Show file tree
Hide file tree
Showing 22 changed files with 2,178 additions and 867 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ libc = "0.2.65"
jack = { version = "0.6.5", optional = true }

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
coreaudio-rs = { version = "0.9.1", default-features = false, features = ["audio_unit", "core_audio"] }
#coreaudio-rs = { version = "0.9.1", default-features = false, features = ["audio_unit", "core_audio"] }
coreaudio-rs = { git = "https://github.com/MichaelHills/coreaudio-rs", branch = "mike-ios-support" }
core-foundation-sys = "0.6.2" # For linking to CoreFoundation.framework and handling device name `CFString`s.
mach = "0.3" # For access to mach_timebase type.

Expand Down
17 changes: 17 additions & 0 deletions examples/ios-feedback/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "cpal-ios-example"
version = "0.1.0"
authors = ["Michael Hills <mhills@gmail.com>"]
edition = "2018"

[lib]
name = "cpal_ios_example"
crate-type = ["staticlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cpal = { path = "../.." }
anyhow = "1.0.12"
ringbuf = "0.1.6"

12 changes: 12 additions & 0 deletions examples/ios-feedback/build_rust_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e

PATH=$PATH:$HOME/.cargo/bin

# If you want your build to run faster, add a "--targets x86_64-apple-ios" for just using the ios simulator.
if [ -n ${IOS_TARGETS} ]; then
cargo lipo --targets ${IOS_TARGETS}
else
cargo lipo
fi

0 comments on commit ce7a2a0

Please sign in to comment.