mitchmindtree e41baa248b Update alsa backend for addition of StreamEvent type
This commit significantly refactors the alsa backend's `EventLoop::run`
implementation in order to allow for better error handling throughout
the loop. This removes many cases that would previously `panic!` in
favour of calling the user callback with the necessary error and
removing the corrupt stream. Seeing as the method cannot return, a
catch-all `panic!` still exists at the end of the method, however this
refactor should make it much easier to remove this restriction in the
future.
2019-06-22 00:06:55 +02:00
2017-10-21 15:08:34 +02:00
2017-03-06 15:57:18 +00:00
2017-10-11 13:24:49 +02:00
2017-02-10 09:45:41 +01:00

CPAL - Cross-Platform Audio Library

Build Status Crates.io docs.rs

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

Note that on Linux, the ALSA development files are required. These are provided as part of the libasound2-dev package on Debian and Ubuntu distributions and alsa-lib-devel on Fedora.

Description
Cross-platform audio in Rust
Readme
Languages
Rust 99.6%
C++ 0.4%