TinyAudio

Minimal cross-platform audio output library for Rust across every major platform

Library
Cargo
v2.0.0
223stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
30/100Needs Attention
Development Activity0
Maintenance0
Community40
Maturity52
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture78
Code Quality74
Innovation68
Learning Curve88

TinyAudio is a small, cross-platform audio output library for Rust whose goal is to give you unified access to your operating system’s default sound output device as easily as possible. It covers desktop (Windows, Linux, macOS), mobile (Android, iOS), and WebAssembly from a single API.

The crate takes floating-point audio samples you prepare and streams them to the default device via a user-supplied callback, automatically converting to the platform’s native sample format and guaranteeing a fixed intermediate buffer size. It deliberately stays minimal: no format decoding, DSP, spatialization, device enumeration, or input capture — just the shortest path from your samples to the speakers. It is released under the MIT license.

What You Get

  • Unified access to the OS default audio output device
  • A callback-driven playback loop with guaranteed buffer sizes
  • Automatic conversion from float samples to the platform format
  • One API spanning desktop, mobile, and WebAssembly

Common Use Cases

  • Playing synthesized or generated audio from a Rust program
  • Providing sound output for a lightweight game or demo
  • Prototyping DSP or synthesis code without a heavy audio stack
  • Shipping the same audio output path across desktop, mobile, and web

Under The Hood

Architecture - TinyAudio creates a platform audio output context and drives it with a user-defined data callback that is invoked periodically to fill the next buffer with float samples; the crate converts those to the nearest platform-supported format and guarantees the requested buffer length. Playback continues until the device instance is dropped.

Tech Stack - Pure Rust with per-platform backends bridging to native audio APIs on Windows, Linux, macOS, Android, iOS, and WebAssembly; distributed as the tinyaudio crate on crates.io.

Code Quality - A deliberately small, single-purpose codebase with clear README documentation of exactly what it does and does not do; it has a modest contributor base and low recent commit activity.

API Design - The API is intentionally tiny: construct an output device with parameters and a sample-supplying closure, and playback starts — an ideal low-friction choice when you only need to get samples to the speakers.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search