| 1 | [package] |
| 2 | name = "cpal" |
| 3 | version = "0.15.3" |
| 4 | description = "Low-level cross-platform audio I/O library in pure Rust." |
| 5 | repository = "https://github.com/rustaudio/cpal" |
| 6 | documentation = "https://docs.rs/cpal" |
| 7 | license = "Apache-2.0" |
| 8 | keywords = ["audio" , "sound" ] |
| 9 | edition = "2021" |
| 10 | rust-version = "1.70" |
| 11 | |
| 12 | [features] |
| 13 | asio = ["asio-sys" , "num-traits" ] # Only available on Windows. See README for setup instructions. |
| 14 | oboe-shared-stdcxx = ["oboe/shared-stdcxx" ] # Only available on Android. See README for what it does. |
| 15 | |
| 16 | [dependencies] |
| 17 | dasp_sample = "0.11" |
| 18 | |
| 19 | [dev-dependencies] |
| 20 | anyhow = "1.0" |
| 21 | hound = "3.5" |
| 22 | ringbuf = "0.3" |
| 23 | clap = { version = "4.0" , features = ["derive" ] } |
| 24 | |
| 25 | [target.'cfg(target_os = "android")'.dev-dependencies] |
| 26 | ndk-glue = "0.7" |
| 27 | |
| 28 | [target.'cfg(target_os = "windows")'.dependencies] |
| 29 | windows = { version = "0.54.0" , features = [ |
| 30 | "Win32_Media_Audio" , |
| 31 | "Win32_Foundation" , |
| 32 | "Win32_Devices_Properties" , |
| 33 | "Win32_Media_KernelStreaming" , |
| 34 | "Win32_System_Com_StructuredStorage" , |
| 35 | "Win32_System_Threading" , |
| 36 | "Win32_Security" , |
| 37 | "Win32_System_SystemServices" , |
| 38 | "Win32_System_Variant" , |
| 39 | "Win32_Media_Multimedia" , |
| 40 | "Win32_UI_Shell_PropertiesSystem" |
| 41 | ]} |
| 42 | asio-sys = { version = "0.2" , path = "asio-sys" , optional = true } |
| 43 | num-traits = { version = "0.2.6" , optional = true } |
| 44 | |
| 45 | [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"))'.dependencies] |
| 46 | alsa = "0.9" |
| 47 | libc = "0.2" |
| 48 | jack = { version = "0.11" , optional = true } |
| 49 | |
| 50 | [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] |
| 51 | core-foundation-sys = "0.8.2" # For linking to CoreFoundation.framework and handling device name `CFString`s. |
| 52 | mach2 = "0.4" # For access to mach_timebase type. |
| 53 | |
| 54 | [target.'cfg(target_os = "macos")'.dependencies] |
| 55 | coreaudio-rs = { version = "0.11" , default-features = false, features = ["audio_unit" , "core_audio" ] } |
| 56 | |
| 57 | [target.'cfg(target_os = "ios")'.dependencies] |
| 58 | coreaudio-rs = { version = "0.11" , default-features = false, features = ["audio_unit" , "core_audio" , "audio_toolbox" ] } |
| 59 | |
| 60 | [target.'cfg(target_os = "emscripten")'.dependencies] |
| 61 | wasm-bindgen = { version = "0.2.89" } |
| 62 | wasm-bindgen-futures = "0.4.33" |
| 63 | js-sys = { version = "0.3.35" } |
| 64 | web-sys = { version = "0.3.35" , features = [ "AudioContext" , "AudioContextOptions" , "AudioBuffer" , "AudioBufferSourceNode" , "AudioNode" , "AudioDestinationNode" , "Window" , "AudioContextState" ] } |
| 65 | |
| 66 | [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] |
| 67 | wasm-bindgen = { version = "0.2.58" , optional = true } |
| 68 | js-sys = { version = "0.3.35" } |
| 69 | web-sys = { version = "0.3.35" , features = [ "AudioContext" , "AudioContextOptions" , "AudioBuffer" , "AudioBufferSourceNode" , "AudioNode" , "AudioDestinationNode" , "Window" , "AudioContextState" ] } |
| 70 | |
| 71 | [target.'cfg(target_os = "android")'.dependencies] |
| 72 | oboe = { version = "0.6" , features = [ "java-interface" ] } |
| 73 | ndk = { version = "0.8" , default-features = false } |
| 74 | ndk-context = "0.1" |
| 75 | jni = "0.21" |
| 76 | |
| 77 | [[example]] |
| 78 | name = "android" |
| 79 | path = "examples/android.rs" |
| 80 | crate-type = ["cdylib" ] |
| 81 | |
| 82 | [[example]] |
| 83 | name = "beep" |
| 84 | |
| 85 | [[example]] |
| 86 | name = "enumerate" |
| 87 | |
| 88 | [[example]] |
| 89 | name = "feedback" |
| 90 | |
| 91 | [[example]] |
| 92 | name = "record_wav" |
| 93 | |
| 94 | [[example]] |
| 95 | name = "synth_tones" |
| 96 | |