nandi/jolt-nativepublic Fork 0
fa4ecdfed6a830e6099d5fab9be24ef72ea1923b
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Cargo.toml · 219 lines · 6.8 KBTOML Blame HistoryRaw
Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago1[package]
2name = "cpal"
3version = "0.18.0"
4description = "Low-level cross-platform audio I/O library in pure Rust."
5repository = "https://github.com/RustAudio/cpal"
6documentation = "https://docs.rs/cpal"
7license = "Apache-2.0"
8keywords = ["audio", "sound"]
9edition = "2021"
10rust-version = "1.78"
11
12[features]
13# Audio thread priority elevation
14# Raises the audio callback thread to real-time priority for lower latency and fewer glitches
15# Requires: On Linux, either rtkit or appropriate user permissions (e.g. limits.conf or capabilities)
16# Platform: Linux, DragonFly BSD, FreeBSD, NetBSD, Windows
17audio_thread_priority = ["dep:audio_thread_priority"]
18
19# ASIO backend for Windows
20# Provides low-latency audio I/O by bypassing the Windows audio stack
21# Requires: ASIO drivers and LLVM/Clang for build-time bindings
22# See README for detailed setup instructions
23asio = [
24 "dep:asio-sys",
25 "dep:num-traits",
26]
27
28# Audio Worklet backend for WebAssembly
29# Provides lower-latency web audio processing compared to default Web Audio API
30# Requires: Build with atomics support and Cross-Origin headers for SharedArrayBuffer
31# Platform: WebAssembly (wasm32-unknown-unknown)
32audioworklet = [
33 "wasm-bindgen",
34 "web-sys/Blob",
35 "web-sys/BlobPropertyBag",
36 "web-sys/Url",
37 "web-sys/AudioWorklet",
38 "web-sys/AudioWorkletNode",
39 "web-sys/AudioWorkletNodeOptions",
40]
41
42# Support for user-defined custom hosts, devices, and streams
43# Allows integration with audio systems not natively supported by CPAL
44# See examples/custom.rs for usage
45# Platform: All platforms
46custom = []
47
48# JACK Audio Connection Kit backend
49# Provides low-latency connections between applications and audio hardware
50# Requires: JACK server and client libraries installed on the system
51# Platform: Linux, DragonFly BSD, FreeBSD, NetBSD, macOS, Windows
52# Note: JACK must be installed separately on all platforms
53jack = ["dep:jack"]
54
55# PipeWire backend
56# Provides audio I/O on Linux and some BSDs via the PipeWire multimedia server
57# Requires: PipeWire server and client libraries installed on the system
58# Platform: Linux, DragonFly BSD, FreeBSD, NetBSD
59pipewire = ["dep:pipewire"]
60
61# PulseAudio backend
62# Provides audio I/O support on Linux and some BSDs using the PulseAudio sound server
63# Requires: PulseAudio server and client libraries installed on the system
64# Platform: Linux, DragonFly BSD, FreeBSD, NetBSD
65pulseaudio = ["dep:pulseaudio", "dep:futures"]
66
67# WebAssembly backend using wasm-bindgen
68# Enables the Web Audio API backend for browser-based audio
69# Required for any WebAssembly audio support
70# Platform: WebAssembly (wasm32-unknown-unknown)
71# Note: This is typically enabled automatically when targeting wasm32
72wasm-bindgen = ["dep:wasm-bindgen", "dep:wasm-bindgen-futures"]
73
74[dependencies]
75dasp_sample = "0.11"
76
77[dev-dependencies]
78anyhow = "1.0"
79hound = "3.5"
80ringbuf = "0.4"
81clap = { version = ">=4.0, <=4.5.57", features = ["derive"] }
82
83# Support a range of versions in order to avoid duplication of this crate. Make sure to test all
84# versions when bumping to a new release, and only increase the minimum when absolutely necessary.
85# When updating this, also update the "windows-version" matrix in the CI workflow.
86[target.'cfg(target_os = "windows")'.dependencies]
87windows = { version = ">=0.59, <=0.62", features = [
88 "Win32_Media_Audio",
89 "Win32_Foundation",
90 "Win32_Devices_Properties",
91 "Win32_Media_KernelStreaming",
92 "Win32_System_Com_StructuredStorage",
93 "Win32_System_Threading",
94 "Win32_Security",
95 "Win32_System_SystemServices",
96 "Win32_System_Variant",
97 "Win32_Media_Multimedia",
98 "Win32_UI_Shell_PropertiesSystem",
99] }
100audio_thread_priority = { version = "0.34", optional = true }
101asio-sys = { version = "0.3.0", path = "asio-sys", optional = true }
102num-traits = { version = "0.2", optional = true }
103jack = { version = "0.13", optional = true }
104
105[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"))'.dependencies]
106alsa = "0.11"
107libc = "0.2"
108audio_thread_priority = { version = "0.34", optional = true }
109jack = { version = "0.13", optional = true }
110pulseaudio = { version = "0.3", optional = true }
111futures = { version = "0.3", optional = true }
112pipewire = { version = "0.9", optional = true, features = ["v0_3_53"] }
113
114[target.'cfg(target_vendor = "apple")'.dependencies]
115mach2 = "0.5"
116coreaudio-rs = { version = "0.14", default-features = false, features = [
117 "core_audio",
118 "audio_toolbox",
119] }
120objc2-core-audio = { version = "0.3", default-features = false, features = [
121 "std",
122 "AudioHardware",
123 "AudioHardwareDeprecated",
124 "objc2",
125 "objc2-foundation",
126] }
127objc2-audio-toolbox = { version = "0.3", default-features = false, features = [
128 "std",
129 "AUComponent",
130 "AudioUnitProperties",
131] }
132objc2-core-audio-types = { version = "0.3", default-features = false, features = [
133 "std",
134 "CoreAudioBaseTypes",
135] }
136objc2-core-foundation = { version = "0.3" }
137objc2-foundation = { version = "0.3" }
138objc2 = { version = "0.6" }
139
140[target.'cfg(target_os = "macos")'.dependencies]
141jack = { version = "0.13", optional = true }
142
143[target.'cfg(target_os = "ios")'.dependencies]
144objc2-avf-audio = { version = "0.3", default-features = false, features = [
145 "std",
146 "AVAudioSession",
147] }
148
149[target.'cfg(target_os = "emscripten")'.dependencies]
150wasm-bindgen = { version = "0.2" }
151wasm-bindgen-futures = "0.4"
152js-sys = { version = "0.3" }
153web-sys = { version = "0.3", features = [
154 "AudioContext",
155 "AudioContextOptions",
156 "AudioBuffer",
157 "AudioBufferSourceNode",
158 "AudioNode",
159 "AudioDestinationNode",
160 "Window",
161 "AudioContextState",
162] }
163
164[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
165wasm-bindgen = { version = "0.2", optional = true }
166wasm-bindgen-futures = { version = "0.4", optional = true }
167js-sys = { version = "0.3" }
168web-sys = { version = "0.3", features = [
169 "AudioContext",
170 "AudioContextOptions",
171 "AudioBuffer",
172 "AudioBufferSourceNode",
173 "AudioNode",
174 "AudioDestinationNode",
175 "Window",
176 "AudioContextState",
177] }
178
179[target.'cfg(target_os = "android")'.dependencies]
180ndk = { version = "0.9", default-features = false, features = [
181 "audio",
182 "api-level-26",
183] }
184ndk-context = "0.1"
185jni = "0.21"
186num-derive = "0.4"
187num-traits = "0.2"
188
189[[example]]
190name = "beep"
191
192[[example]]
193name = "enumerate"
194
195[[example]]
196name = "feedback"
197
198[[example]]
199name = "record_wav"
200
201[[example]]
202name = "synth_tones"
203
204[package.metadata.docs.rs]
205all-features = true
206rustdoc-args = ["--cfg", "docsrs"]
207targets = [
208 "x86_64-unknown-linux-gnu",
209 "x86_64-pc-windows-msvc",
210 "x86_64-apple-darwin",
211 "aarch64-apple-darwin",
212 "aarch64-apple-ios",
213 "wasm32-unknown-unknown",
214 "wasm32-unknown-emscripten",
215 "aarch64-linux-android",
216 "x86_64-unknown-freebsd",
217 "x86_64-unknown-netbsd",
218 "x86_64-unknown-dragonfly",
219]