3 unstable releases
0.3.0 | Mar 24, 2024 |
---|---|
0.2.2 | Mar 15, 2024 |
0.2.1 | Mar 15, 2024 |
#391 in Audio
241 downloads per month
9KB
214 lines
Monolib
A library implementing the lonely radio audio streaming protocol
Documentation
Examples
License
monolib is licensed under the terms of the MIT license.
lib.rs
:
A library implementing the lonely radio audio streaming protocol
Example usage (play for 10 seconds):
extern crate monolib;
use std::thread::{sleep, spawn};
use std::time::Duration;
spawn(|| monolib::run("someserver:someport"));
while monolib::get_metadata().is_none() {}
let seconds = md.length / md.sample_rate as u64 / 2;
println!("Playing: {} - {} - {} ({}:{:02})", md.artist, md.album, md.title, seconds / 60, seconds % 60);
sleep(Duration::from_secs(10));
monolib::stop();
Dependencies
~1–36MB
~492K SLoC