Crates.io | wasapi |
lib.rs | wasapi |
version | 0.15.0 |
source | src |
created_at | 2021-06-05 20:05:54.402287 |
updated_at | 2024-06-17 21:08:59.174915 |
description | Bindings for the Wasapi API on Windows |
homepage | |
repository | https://github.com/HEnquist/wasapi-rs |
max_upload_size | |
id | 406605 |
size | 127,255 |
The aim of this crate is to provide easy and safe access to the Wasapi API for audio playback and capture.
The presented API is all safe Rust, but structs and functions closely follow the original Windows API.
For details on how to use Wasapi, please see the Windows documentation.
Bindings are generated automatically using the windows crate.
These things have been implemented so far:
Example | Description |
---|---|
playsine |
Plays a sine wave in shared mode on the default output device. |
playsine_events |
Similar to playsine but also listens to notifications. |
playnoise_exclusive |
Plays white noise in exclusive mode on the default output device. Shows how to handle HRESULT errors. |
loopback |
Shows how to simultaneously capture and render sound, with separate threads for capture and render. |
record |
Records audio from the default device, and saves the raw samples to a file. |
devices |
Lists all available audio devices and displays the default devices. |
record_application |
Records audio from a single application, and saves the raw samples to a file. |