forked from RustAudio/cpal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coreaudio] Fix handling of non-default sample rates for input streams (
RustAudio#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 RustAudio#213. * Update CHANGELOG for coreaudio input stream sample rate fix * Publish 0.8.1 for coreaudio input stream sample rate fix
- Loading branch information
1 parent
06a0f0a
commit a2fe938
Showing
3 changed files
with
168 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cpal" | ||
version = "0.8.0" | ||
version = "0.8.1" | ||
authors = ["The CPAL contributors", "Pierre Krieger <[email protected]>"] | ||
description = "Low-level cross-platform audio playing library in pure Rust." | ||
repository = "https://github.com/tomaka/cpal" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters