Crates.io | radio-rs |
lib.rs | radio-rs |
version | 2.0.2 |
source | src |
created_at | 2024-09-12 16:26:35.29186 |
updated_at | 2024-10-26 11:35:27.782677 |
description | A very simple, high level, audio playback library, ported from raudio library, for games. |
homepage | |
repository | https://github.com/AnkurMal/radio |
max_upload_size | |
id | 1372899 |
size | 1,132,235 |
A very simple, high level, audio playback library, ported from raudio library, for games.
Sound
or Music
: .wav
, .qoa
, .ogg
, .mp3
, .flac
Music
: .xm
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();
}
}
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
}
}