Update CPAL to version 0.10.0.

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.
This commit is contained in:
mitchmindtree 2019-07-05 19:29:47 +02:00
parent 6cd7492f4c
commit 391b32f5b2
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,16 @@
# Unreleased # Unreleased
# Version 0.10.0 (2019-07-05)
- core-foundation-sys and coreaudio-rs version bumps.
- Add an ASIO host, available under Windows.
- Introduce a new Host API, adding support for alternative audio APIs.
- Remove sleep loop on macOS in favour of using a `Condvar`.
- Allow users to handle stream callback errors with a new `StreamEvent` type.
- Overhaul error handling throughout the crate.
- Remove unnecessary Mutex from ALSA and WASAPI backends in favour of channels.
- Remove `panic!` from OutputBuffer Deref impl as it is no longer necessary.
# Version 0.9.0 (2019-06-06) # Version 0.9.0 (2019-06-06)
- Better buffer handling - Better buffer handling

View File

@ -1,8 +1,8 @@
[package] [package]
name = "cpal" name = "cpal"
version = "0.9.0" version = "0.10.0"
authors = ["The CPAL contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"] authors = ["The CPAL contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Low-level cross-platform audio playing library in pure Rust." description = "Low-level cross-platform audio I/O library in pure Rust."
repository = "https://github.com/tomaka/cpal" repository = "https://github.com/tomaka/cpal"
documentation = "https://docs.rs/cpal" documentation = "https://docs.rs/cpal"
license = "Apache-2.0" license = "Apache-2.0"