rustaudio/cpal

Low-level cross-platform audio I/O library in Rust

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 28 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 17th, 2026
Created on December 11th, 2014
Open Issues & Pull Requests: 102 (+1)
GitHub issues: Enabled
Number of forks: 543
Total Stargazers: 3,939 (+0)
Total Subscribers: 27 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.2 days
Mean response time: 312.5 days
90th percentile: 993.4 days
Tracked items: 293

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Practically every issue opened in the past year has drawn a reply. 83% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "question" is answered fastest, typically in about 5 hours, while "enhancement" waits about 17 months. 85% of issues opened in the past year have been closed, leaving a working backlog. Three people close 89% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 43
New in 7 days: 4
Closed in 7 days: 1
Avg open age: 1,332 days
Stale 30+ days: 28
Stale 90+ days: 20

Recent activity

Opened in 7 days: 4
Closed in 7 days: 1
Comments in 7 days: 6
Events in 7 days: 9

Top labels

  • bug (74)
  • feature request (50)
  • host - alsa (41)
  • question (37)
  • host - wasapi (20)
  • platform - linux (18)
  • host - asio (17)
  • host - pipewire (12)

Detailed Description

CPAL is a low-level cross-platform audio I/O library written in Rust.

The library solves the problem of accessing audio input and output across different operating systems and audio backends by providing a unified interface. It abstracts away platform-specific differences, allowing developers to enumerate audio hosts and devices, inspect device metadata, build streams with configurable sample formats, and control playback through play, pause, and buffer-querying operations. The approach uses platform-native backends: AAudio on Android, CoreAudio on Apple platforms, ALSA on Linux and BSD, and WASAPI on Windows, with optional support for JACK, PipeWire, PulseAudio, ASIO, and Web Audio API depending on the platform.

Developers should choose this library when building audio applications that require direct, low-level control over audio streams across multiple platforms. It suits projects that need fine-grained access to device enumeration, stream configuration, and real-time audio processing. The README explicitly recommends higher-level alternatives like Rodio for simpler audio playback and capture use cases, positioning CPAL as the appropriate choice when lower-level functionality is required.

The project maintains active support across a wide range of platforms and backends, with each backend having clearly documented minimum Rust versions and operating system requirements. Development appears focused on stability and compatibility, as evidenced by the detailed specification of minimum supported versions for each platform-backend combination and the careful documentation of build dependencies, particularly the requirement for ALSA development files on Linux systems regardless of which audio backend is ultimately used.