Skip to content

Commit

Permalink
Use objc2
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jan 26, 2025
1 parent a2ce359 commit ff81c15
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 210 deletions.
39 changes: 28 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "coreaudio-rs"
version = "0.12.1"
authors = ["mitchmindtree <[email protected]>", "yupferris <[email protected]>"]
authors = [
"mitchmindtree <[email protected]>",
"yupferris <[email protected]>",
]
description = "A friendly rust interface for Apple's CoreAudio API."
keywords = ["core", "audio", "unit", "osx", "ios"]
readme = "README.md"
Expand All @@ -14,19 +17,33 @@ homepage = "https://github.com/RustAudio/coreaudio-rs"
name = "coreaudio"

[features]
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]
audio_toolbox = ["coreaudio-sys/audio_toolbox"]
audio_unit = ["coreaudio-sys/audio_unit"]
core_audio = ["coreaudio-sys/core_audio"]
open_al = ["coreaudio-sys/open_al"]
core_midi = ["coreaudio-sys/core_midi"]
default = ["audio_toolbox", "audio_unit", "core_audio", "core_midi"]
audio_toolbox = ["dep:objc2-audio-toolbox"]
core_audio = ["dep:objc2-core-audio", "dep:objc2-core-audio-types"]
core_midi = ["dep:objc2-core-midi"]

# Deprecated
audio_unit = ["audio_toolbox"]

# Unsupported
open_al = []

[dependencies]
bitflags = "1.0"
coreaudio-sys = { version = "0.2", default-features = false }
core-foundation-sys = "0.8.3"
libc = "0.2"

objc2-core-foundation = { version = "0.3", default-features = false, features = [
"std",
"CFBase",
"CFString",
] }
# TODO: Only enable needed features.
objc2-audio-toolbox = { version = "0.3", optional = true }
objc2-core-audio = { version = "0.3", optional = true }
objc2-core-audio-types = { version = "0.3", optional = true }
objc2-core-midi = { version = "0.3", optional = true }

[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
targets = ["x86_64-apple-darwin", "x86_64-apple-ios"]
default-target = "aarch64-apple-darwin"
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-apple-ios"]
Loading

0 comments on commit ff81c15

Please sign in to comment.