1 unstable release
Uses new Rust 2024
new 0.1.2 | Apr 3, 2025 |
---|
#9 in #core-audio
103 downloads per month
Used in 3 crates
(2 directly)
3MB
25K
SLoC
Aloe AU CoreAudio Crate
Aloe-AU-CoreAudio is a sophisticated Rust library specifically engineer for audio handling on macOS and iOS platforms. Leveraging Apple's AudioToolbox framework, it provides robust support for interacting with CoreAudio APIs to manage audio I/O streams, formats, devices, and channel layouts.
Concepts and Features
CoreAudio Integration
The crate offers comprehensive bindings and abstractions for working with CoreAudio's AudioChannelLayout and AudioChannelLayoutTag. It enables the conversion between CoreAudio's native layout and Aloe's AudioChannelSet, facilitating operations on various channel configurations without losing fidelity.
Device Management and Audio IO
Through the provided structured types, such as CoreAudioIODevice
and AudioIODeviceCombiner
, users can manage multiple audio devices concurrently, implementing sophisticated I/O operations including read, write, and buffer manipulation.
Advanced Features
- Real-time Audio Processing: Properly synchronizes audio callbacks using high-performance structures like
CriticalSection
andAtomic
. - Sample Rate and Buffer Management: Dynamically adjusts sample rates and buffer sizes to match device specifications optimally.
- Comprehensive Error Handling: Captures and handles various CoreAudio errors gracefully, enhancing application stability.
Usage
To utilize this crate, include it in your Rust project's Cargo.toml
as follows:
[dependencies]
aloe-au-coreaudio = "0.1.0"
Ensure your build environment is configured for macOS or iOS targets due to dependencies on Apple's CoreAudio APIs.
Example
use aloe_au_coreaudio::CoreAudioIODevice;
fn main() {
let mut device = CoreAudioIODevice::new(/* parameters */);
device.open(...);
device.start(...);
// Process audio...
device.stop();
}
Repository
This project is hosted on GitHub. Contributions and issues are welcomed.
Note: This README.md file was generated by an AI model and may not be 100% accurate. However, it should be pretty good.
This crate is a translation of the JUCE module.
JUCE is a c++ software framework for developing high performance audio applications.
Usage falls under the GPLv3 as well as the JUCE commercial license.
See github.com/juce-framework/JUCE and the JUCE license page for details.
This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.
Dependencies
~26–37MB
~608K SLoC