Skip to content

Commit ce7a2a0

Browse files
committed
Refactor coreaudio host and add iOS support + ios-feedback example
1 parent a777589 commit ce7a2a0

File tree

22 files changed

+2178
-867
lines changed

22 files changed

+2178
-867
lines changed

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ libc = "0.2.65"
3434
jack = { version = "0.6.5", optional = true }
3535

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

examples/ios-feedback/Cargo.toml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "cpal-ios-example"
3+
version = "0.1.0"
4+
authors = ["Michael Hills <mhills@gmail.com>"]
5+
edition = "2018"
6+
7+
[lib]
8+
name = "cpal_ios_example"
9+
crate-type = ["staticlib"]
10+
11+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
12+
13+
[dependencies]
14+
cpal = { path = "../.." }
15+
anyhow = "1.0.12"
16+
ringbuf = "0.1.6"
17+
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
PATH=$PATH:$HOME/.cargo/bin
6+
7+
# If you want your build to run faster, add a "--targets x86_64-apple-ios" for just using the ios simulator.
8+
if [ -n ${IOS_TARGETS} ]; then
9+
cargo lipo --targets ${IOS_TARGETS}
10+
else
11+
cargo lipo
12+
fi

0 commit comments

Comments
 (0)