Skip to content

Commit a38d8d1

Browse files
committed
Use objc2
1 parent a2ce359 commit a38d8d1

File tree

7 files changed

+287
-214
lines changed

7 files changed

+287
-214
lines changed

Cargo.toml

Lines changed: 93 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,98 @@ 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"]
21+
audio_toolbox = ["dep:objc2-audio-toolbox", "dep:objc2-core-foundation"]
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+
objc2-core-foundation = { version = "0.3", optional = true, default-features = false, features = [
35+
"std",
36+
"CFBase",
37+
"CFString",
38+
] }
39+
objc2-audio-toolbox = { version = "0.3", optional = true, default-features = false, features = [
40+
"std",
41+
"bitflags",
42+
"libc",
43+
"objc2-core-foundation",
44+
"AUAudioUnit",
45+
"AUAudioUnitImplementation",
46+
"AUCocoaUIView",
47+
"AUComponent",
48+
"AUGraph",
49+
"AUParameters",
50+
"AudioCodec",
51+
"AudioComponent",
52+
"AudioConverter",
53+
"AudioFile",
54+
"AudioFileStream",
55+
"AudioFormat",
56+
"AudioOutputUnit",
57+
"AudioQueue",
58+
"AudioServices",
59+
"AudioSession",
60+
"AudioUnit",
61+
"AudioUnitCarbonView",
62+
"AudioUnitParameters",
63+
"AudioUnitProperties",
64+
"AudioUnitUtilities",
65+
"AudioWorkInterval",
66+
"CAFFile",
67+
"CAShow",
68+
"DefaultAudioOutput",
69+
"ExtendedAudioFile",
70+
"MusicDevice",
71+
"MusicPlayer",
72+
"objc2-core-audio",
73+
"objc2-core-audio-types",
74+
] }
75+
objc2-core-audio = { version = "0.3", optional = true, default-features = false, features = [
76+
"std",
77+
"objc2-core-audio-types",
78+
"AudioHardware",
79+
"AudioHardwareDeprecated",
80+
"AudioServerPlugIn",
81+
"HostTime",
82+
] }
83+
objc2-core-audio-types = { version = "0.3", optional = true, default-features = false, features = [
84+
"std",
85+
"bitflags",
86+
"AudioSessionTypes",
87+
"CoreAudioBaseTypes",
88+
] }
89+
objc2-core-midi = { version = "0.3", optional = true, default-features = false, features = [
90+
"std",
91+
"objc2-core-foundation",
92+
"MIDIBluetoothConnection",
93+
"MIDICIDevice",
94+
"MIDICIDeviceManager",
95+
"MIDICapabilityInquiry",
96+
"MIDIDriver",
97+
"MIDIMessages",
98+
"MIDINetworkSession",
99+
"MIDIServices",
100+
"MIDISetup",
101+
"MIDIThruConnection",
102+
"MIDIUMPCI",
103+
"MIDIUMPCIProfile",
104+
"MIDIUMPEndpoint",
105+
"MIDIUMPEndpointManager",
106+
"MIDIUMPFunctionBlock",
107+
"MIDIUMPMutableEndpoint",
108+
"MIDIUMPMutableFunctionBlock",
109+
] }
28110

29111
[package.metadata.docs.rs]
30112
all-features = true
31-
default-target = "x86_64-apple-darwin"
32-
targets = ["x86_64-apple-darwin", "x86_64-apple-ios"]
113+
default-target = "aarch64-apple-darwin"
114+
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-apple-ios"]

0 commit comments

Comments
 (0)