This is quite a significant update for CPAL, including a number of breaking changes. Here is a list of the breaking changes along with links to where you can find more information: - A `Host` API has been introduced in #289 along with a follow-up refactor in #295. Please see the examples for a demonstration of how to update your code. The necessary changes should hopefully be minimal. If this has caused you any major difficulty please let us know in an issue! - An ASIO host has been introduced in #292. This adds support for Steinberg's ASIO audio driver API on Windows. Please see the ASIO section of the README for more information on how to setup CPAL with ASIO support for your project. - The user callback API has been overhauled to emit `StreamEvent`s rather than buffers in order to support handling stream errors. #288. - Error handling in general was overhauled in #286. This meant taking advantage of the `failure` crate and adding support for backend-specific errors with custom messages. Many unnecessary `panic!`s have been removed, but a few remain that would indicate bugs in CPAL. In general, checking out the updated examples will be the easiest way to get a quick overview on how you can update your own code for these changes. The CHANGELOG.md has been updated to include these changes.
35 lines
1.4 KiB
TOML
35 lines
1.4 KiB
TOML
[package]
|
|
name = "cpal"
|
|
version = "0.10.0"
|
|
authors = ["The CPAL contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
|
description = "Low-level cross-platform audio I/O library in pure Rust."
|
|
repository = "https://github.com/tomaka/cpal"
|
|
documentation = "https://docs.rs/cpal"
|
|
license = "Apache-2.0"
|
|
keywords = ["audio", "sound"]
|
|
|
|
[features]
|
|
asio = ["asio-sys"] # Only available on Windows. See README for setup instructions.
|
|
|
|
[dependencies]
|
|
failure = "0.1.5"
|
|
lazy_static = "1.3"
|
|
num-traits = "0.2.6"
|
|
|
|
[dev-dependencies]
|
|
hound = "3.4"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
winapi = { version = "0.3", features = ["audiosessiontypes", "audioclient", "coml2api", "combaseapi", "debug", "devpkey", "handleapi", "ksmedia", "mmdeviceapi", "objbase", "std", "synchapi", "winuser"] }
|
|
asio-sys = { version = "0.1", path = "asio-sys", optional = true }
|
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))'.dependencies]
|
|
alsa-sys = { version = "0.1", path = "alsa-sys" }
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
|
|
coreaudio-rs = { version = "0.9.1", default-features = false, features = ["audio_unit", "core_audio"] }
|
|
core-foundation-sys = "0.6.2" # For linking to CoreFoundation.framework and handling device name `CFString`s.
|
|
|
|
[target.'cfg(target_os = "emscripten")'.dependencies]
|
|
stdweb = { version = "0.1.3", default-features = false }
|