#engine #framework #audio-playback #cafe #audio-engine

mocha_audio

Library for handle audio, for now it's just a wrapper for miniaudio

2 releases

Uses old Rust 2015

0.1.1 Sep 5, 2023
0.1.0 Sep 3, 2023

#887 in Audio


Used in cafe_core

MIT license

2MB
495 lines

Mocha

Mocha is a lib for handle audio using miniaudio, my plan is to exclude miniaudio dependency for use Rust only to make an audio engine.

The project is one of the modules of the cafe project.

extern crate mocha;

use mocha::{Audio, AudioUsage};

fn main() {
    mocha::init();
    let audio = mocha::load("audio.wav", AudioUsage::Stream).unwrap();
    let instance = audio.play();
    while instance.is_playing() {}
    mocha::quit();
}

No runtime deps