a2fe9386af
* [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 |
||
---|---|---|
.circleci | ||
alsa-sys | ||
examples | ||
src | ||
.gitignore | ||
.rustfmt.toml | ||
.travis.yml | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md | ||
appveyor.yml |
README.md
CPAL - Cross-Platform Audio Library
Low-level library for audio input and output in pure Rust.
This library currently supports the following:
- Enumerate all available audio devices.
- Get the current default input and output devices.
- Enumerate known supported input and output stream formats for a device.
- Get the current default input and output stream formats for a device.
- Build and run input and output PCM streams on a chosen device with a given stream format.
Currently supported backends include:
- Linux (via ALSA)
- Windows
- macOS (via CoreAudio)
- iOS (via CoreAudio)
- Emscripten