11 unstable releases (5 breaking)

Uses old Rust 2015

0.8.0 Feb 12, 2020
0.7.0 Aug 22, 2019
0.6.0 Jun 2, 2019
0.5.1 Apr 3, 2018
0.3.4 Feb 3, 2016

#141 in Audio

Download history 32/week @ 2023-12-14 25/week @ 2023-12-21 6/week @ 2023-12-28 13/week @ 2024-01-04 23/week @ 2024-01-11 15/week @ 2024-01-18 4/week @ 2024-01-25 6/week @ 2024-02-01 21/week @ 2024-02-08 66/week @ 2024-02-15 86/week @ 2024-02-22 58/week @ 2024-02-29 91/week @ 2024-03-07 70/week @ 2024-03-14 77/week @ 2024-03-21 98/week @ 2024-03-28

336 downloads per month
Used in 6 crates

MIT license


ears Build Status Build status

Ears aims to be a convenient and easy to understand Rust interface over OpenAL.

It's designed first and foremost for game development, giving you easy access to complex functionality like HRTF, spatialization, and environmental effects with almost no configuration required.

View documentation

Supports a wide variety of audio formats, including:

  • Ogg Vorbis
  • Microsoft WAV
  • Lossless FLAC
  • AIFF

For a full list please see the documentation for libsndfile here: http://www.mega-nerd.com/libsndfile/

Before you start

You need to install OpenAL and libsndfile on your system.

Linux (Debian and Ubuntu):

sudo apt install libopenal-dev libsndfile1-dev

Linux (Fedora):

sudo dnf install openal-soft-devel libsndfile-devel


brew install openal-soft libsndfile


Install MSYS2 according to the instructions. Be sure to use the default installation folder (i.e. C:\msys32 or C:\msys64), otherwise compiling won't work. Then, run the following in the MSYS2 shell:

pacman -S mingw-w64-x86_64-libsndfile mingw-w64-x86_64-openal


Include ears in your Cargo.toml dependencies.

ears = "0.8.0"

Playing a sound effect while simultaneously streaming music off disk is as simple as it gets.

extern crate ears;
use ears::{Music, Sound, AudioController};

fn main() {
    let mut music = Music::new("your-music.ogg").unwrap();

    let mut sound = Sound::new("your-sound-effect.wav").unwrap();

    while music.is_playing() || sound.is_playing() {};

Running examples

cargo run --example basic
cargo run --example advanced
cargo run --example music
cargo run --example record
cargo run --example simple_player
cargo run --example threads
cargo run --example direct_channel