#audio-playback #sound #music #level #high #ported #raudio

radio-rs

A very simple, high level, audio playback library, ported from raudio library, for games

2 stable releases

2.0.2 Oct 26, 2024
2.0.1 Sep 13, 2024
1.0.1 Sep 13, 2024
1.0.0 Sep 12, 2024

#261 in Audio

Download history 321/week @ 2024-09-10 28/week @ 2024-09-17 5/week @ 2024-09-24 4/week @ 2024-10-01 2/week @ 2024-10-08 112/week @ 2024-10-22 15/week @ 2024-10-29

127 downloads per month

MIT license

1MB
313 lines

Contains (static library, 1MB) libaudio.a

A very simple, high level, audio playback library, ported from raudio library, for games.

Supported audio formats

  1. Can be played as Sound or Music: .wav, .qoa, .ogg, .mp3, .flac
  2. Can only be played as Music: .xm

Example

  1. Example code of it being used in a standalone manner:
use radio_rs::*;

fn main() {
    let mut audio_device = AudioDevice::new();
    let music = Music::load("music.mp3");

    music.play();
    loop {
        music.update();
        audio_device.sync();
    }
}
  1. Example code of it being used with macroquad:
use radio_rs::*;
use macroquad::prelude::*;

#[macroquad::main("sample")]
async fn main() {
    let audio_device = AudioDevice::new();
    let music = Music::load("music.mp3");

    music.play();
    loop {
        clear_background(LIGHTGRAY);
        music.update();
        audio_device.sync();
        
        next_frame().await
    }
}

No runtime deps