Skip to content

Commit 8e5379e

Browse files
committed
Use objc2
1 parent a2ce359 commit 8e5379e

File tree

7 files changed

+222
-214
lines changed

7 files changed

+222
-214
lines changed

Cargo.toml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "coreaudio-rs"
33
version = "0.12.1"
4-
authors = ["mitchmindtree <[email protected]>", "yupferris <[email protected]>"]
4+
authors = [
5+
"mitchmindtree <[email protected]>",
6+
"yupferris <[email protected]>",
7+
]
58
description = "A friendly rust interface for Apple's CoreAudio API."
69
keywords = ["core", "audio", "unit", "osx", "ios"]
710
readme = "README.md"
@@ -14,19 +17,33 @@ homepage = "https://github.com/RustAudio/coreaudio-rs"
1417
name = "coreaudio"
1518

1619
[features]
17-
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]
18-
audio_toolbox = ["coreaudio-sys/audio_toolbox"]
19-
audio_unit = ["coreaudio-sys/audio_unit"]
20-
core_audio = ["coreaudio-sys/core_audio"]
21-
open_al = ["coreaudio-sys/open_al"]
22-
core_midi = ["coreaudio-sys/core_midi"]
20+
default = ["audio_toolbox", "core_audio", "core_midi"]
21+
audio_toolbox = ["dep:objc2-audio-toolbox"]
22+
core_audio = ["dep:objc2-core-audio", "dep:objc2-core-audio-types"]
23+
core_midi = ["dep:objc2-core-midi"]
24+
25+
# Deprecated
26+
audio_unit = ["audio_toolbox"]
27+
28+
# Unsupported
29+
open_al = []
2330

2431
[dependencies]
2532
bitflags = "1.0"
26-
coreaudio-sys = { version = "0.2", default-features = false }
27-
core-foundation-sys = "0.8.3"
33+
libc = "0.2"
34+
35+
objc2-core-foundation = { version = "0.3", default-features = false, features = [
36+
"std",
37+
"CFBase",
38+
"CFString",
39+
] }
40+
# TODO: Only enable needed features.
41+
objc2-audio-toolbox = { version = "0.3", optional = true }
42+
objc2-core-audio = { version = "0.3", optional = true }
43+
objc2-core-audio-types = { version = "0.3", optional = true }
44+
objc2-core-midi = { version = "0.3", optional = true }
2845

2946
[package.metadata.docs.rs]
3047
all-features = true
31-
default-target = "x86_64-apple-darwin"
32-
targets = ["x86_64-apple-darwin", "x86_64-apple-ios"]
48+
default-target = "aarch64-apple-darwin"
49+
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-apple-ios"]

0 commit comments

Comments
 (0)