Kitedesk fork of github.com/rustdesk-org/cpal (Apache-2.0, upstream osx-screencapturekit 96d4da12). Branch kd/b283-sck-audio: ScreenCaptureKit audio only on macOS 13+, without the capturing process's own audio (B283).
The internal alsa, null and emscripten Device implementations already
implemented Debug; but the coreaudio and wasapi ones, and therefore
also the wrapper, did not.
I decided to eschew the `Device(…)` wrapping in the outer layer
(hence a custom implementation rather than `#[derive(Debug)]`),
because `Device(Device)`, `Device(Device { … })` and so forth all
look better without the extra `Device(…)` wrapping.
On the wasapi and coreaudio implementations I put both the pointer and
name. Name because it’s useful, pointer because on Windows at least
I believe duplicated names are possible. (e.g. two monitors that include
monitors, of the same type; I haven’t strictly confirmed this, because I
killed those off harshly on my machine and don’t want to reinstate
them.)
I do not have access to a macOS device to confirm that the coreaudio
implementation is sane, but I think it is.
|
||
|---|---|---|
| .circleci | ||
| alsa-sys | ||
| examples | ||
| src | ||
| .gitignore | ||
| .rustfmt.toml | ||
| .travis.yml | ||
| appveyor.yml | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| 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
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.