1[package] 2name = "cpal" 3version = "0.13.4" 4authors = ["The CPAL contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"] 5description = "Low-level cross-platform audio I/O library in pure Rust." 6repository = "https://github.com/rustaudio/cpal" 7documentation = "https://docs.rs/cpal" 8license = "Apache-2.0" 9keywords = ["audio", "sound"] 10 11[features] 12asio = ["asio-sys", "num-traits"] # Only available on Windows. See README for setup instructions. 13 14[dependencies] 15thiserror = "1.0.2" 16 17[dev-dependencies] 18anyhow = "1.0.12" 19hound = "3.4" 20ringbuf = "0.2" 21clap = { version = "2.33.3", default-features = false } 22 23[target.'cfg(target_os = "windows")'.dependencies] 24winapi = { version = "0.3", features = ["audiosessiontypes", "audioclient", "coml2api", "combaseapi", "debug", "devpkey", "handleapi", "ksmedia", "mmdeviceapi", "objbase", "profileapi", "std", "synchapi", "winbase", "winuser"] } 25asio-sys = { version = "0.2", path = "asio-sys", optional = true } 26num-traits = { version = "0.2.6", optional = true } 27parking_lot = "0.11" 28lazy_static = "1.4" 29 30[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))'.dependencies] 31alsa = "0.5" 32nix = "0.20" 33libc = "0.2.65" 34parking_lot = "0.11" 35jack = { version = "0.7.0", optional = true } 36 37[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] 38core-foundation-sys = "0.8.2" # For linking to CoreFoundation.framework and handling device name `CFString`s. 39mach = "0.3" # For access to mach_timebase type. 40 41[target.'cfg(target_os = "macos")'.dependencies] 42coreaudio-rs = { version = "0.10.0", default-features = false, features = ["audio_unit", "core_audio"] } 43 44[target.'cfg(target_os = "ios")'.dependencies] 45coreaudio-rs = { version = "0.10.0", default-features = false, features = ["audio_unit", "core_audio", "audio_toolbox"] } 46 47[target.'cfg(target_os = "emscripten")'.dependencies] 48stdweb = { version = "0.1.3", default-features = false } 49 50[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] 51wasm-bindgen = { version = "0.2.58", optional = true } 52js-sys = { version = "0.3.35" } 53web-sys = { version = "0.3.35", features = [ "AudioContext", "AudioContextOptions", "AudioBuffer", "AudioBufferSourceNode", "AudioNode", "AudioDestinationNode", "Window", "AudioContextState"] } 54 55[target.'cfg(target_os = "android")'.dependencies] 56oboe = { version = "0.4.0", features = [ "java-interface" ] } 57ndk = "0.3" 58ndk-glue = "0.3" 59jni = "0.19" 60 61[[example]] 62name = "android" 63path = "examples/android.rs" 64crate-type = ["cdylib"] 65 66[[example]] 67name = "beep" 68 69[[example]] 70name = "enumerate" 71 72[[example]] 73name = "feedback" 74 75[[example]] 76name = "record_wav" 77