cpal/Cargo.toml
mitchmindtree a2fe9386af [coreaudio] Fix handling of non-default sample rates for input streams (#214)
* [coreaudio] Fix handling of non-default sample rates for input streams

Currently when building an input stream the coreaudio backend only
specifies the sample rate for the audio unit, however coreaudio requires
that the audio unit sample rate matches the device sample rate.

This changes the `build_input_stream` behaviour to:

1. Check if the device sample rate differs from the desired one.
2. If so, check that there are no existing audio units using the device
at the current sample rate. If there are, panic with a message
explaining why.
3. Otherwise, change the device sample rate.
4. Continue building the input stream audio unit as normal.

Closes #213.

* Update CHANGELOG for coreaudio input stream sample rate fix

* Publish 0.8.1 for coreaudio input stream sample rate fix
2018-04-01 13:25:46 +02:00

29 lines
1.2 KiB
TOML

[package]
name = "cpal"
version = "0.8.1"
authors = ["The CPAL contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Low-level cross-platform audio playing library in pure Rust."
repository = "https://github.com/tomaka/cpal"
documentation = "https://docs.rs/cpal"
license = "Apache-2.0"
keywords = ["audio", "sound"]
[dependencies]
lazy_static = "0.2"
[dev-dependencies]
hound = "3.0"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["audiosessiontypes", "audioclient", "coml2api", "combaseapi", "debug", "devpkey", "handleapi", "ksmedia", "mmdeviceapi", "objbase", "std", "synchapi", "winuser"] }
[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.0", default-features = false, features = ["audio_unit", "core_audio"] }
core-foundation-sys = "0.5.1" # 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 }