| Crates.io | libminau |
| lib.rs | libminau |
| version | 0.1.0 |
| created_at | 2025-10-10 16:31:13.393439+00 |
| updated_at | 2025-10-10 16:31:13.393439+00 |
| description | A library version of Minau, a music player built directly on top of Symphonia and CPAL. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1877162 |
| size | 150,584 |
This is the library version of Minau, a music player built directly on Symphonia and CPAL. It provides simple functionality for playing audio from local files or URLs.
Add the following line to your Cargo.toml:
// filepath: Cargo.toml
// ...existing code...
[dependencies]
libminau = "0.1.0"
// ...existing code...
Here is a basic example for playing a local music file:
use libminau::player::Player;
use std::time::Duration;
#[tokio::main]
fn main() -> anyhow::Result<()> {
// Play a local file
let mut player = Player::from_file("/path/to/music.mp3")?;
// If you want to specify a URL, use Player::from_url
// let mut player = Player::from_url("https://example.com/music.mp3").await?;
// Set volume
player.set_volume(0.7)?;
// Start playback
player.play()?;
println!("Playback started.");
// Wait for the music to finish
player.wait_until_finished().await;
println!("Playback finished.");
Ok(())
}
This project is released under the BSD-3-Clause license.