cpal
cpal copied to clipboard
Cross-platform audio I/O library in pure Rust
Hello! First off, thanks for your work on this library! `cpal` has been incredibly useful to me as a web/Rust dev. Currently, there are `// TODO`s in place of all...
I'm attempting to use cpal for a browser build of my sound synthesizer, but encountering an issue where `cpal::default_host` has no output devices - `host.devices()` iterator is empty. `host.id()` returns...
I'm not sure whether this is intentional behaviour or not, but it's extremely undesirable and hard to work around. I'm on ALSA, Linux. ## Rough outline - We play some...
The below code is causing a memory leak on my machine: ``` use cpal::traits::HostTrait; fn main() { let host = cpal::ALL_HOSTS .into_iter() .find(|id| id.name() == "WASAPI") .and_then(|id| cpal::host_from_id(*id).ok()) .expect("No WASAPI...
This is something that I've been struggling with because I'm used to working with audio streams broken by channels and sets of samples for each frame that represent a sample...
The current Audio Unit initialization logic produces errors when trying to use output devices as input Audio Units. This results in only some output devices being present when enumerating the...
Here's an interesting example (assuming Windows 11 + ASIO4ALLv2 as a platform): ``` use std::thread; use anyhow; use cpal::{ traits::{DeviceTrait, HostTrait}, }; fn main() -> anyhow::Result { let host =...
Hey there! I'm running into the following issue: 1. I'm enumerating through all the `supported_output_configs()` and finding one where my preferred buffer size fits within the `SupportedBufferSize` range. 2. I...
When obtaining a `SupportedStreamConfig` or `SupportedStreamConfigRange` the `buffer_size` field has a value of `SupportedBufferSize::Range` with `min` being 0 and `max` being 4,294,967,295 (`u32::MAX`). No matter what is passed to the...
If NotSendSyncAcrossAllPlatforms is just there in case of some eventual future Android compatibility, why not lock it behind a feature flag? Not being able to use streams across threads is...