#audio-streaming #radio #protocols #sleep #lonely

monolib

A library implementing the lonely radio audio streaming protocol

3 unstable releases

0.3.0 Mar 24, 2024
0.2.2 Mar 15, 2024
0.2.1 Mar 15, 2024

#391 in Audio

Download history 163/week @ 2024-03-12 148/week @ 2024-03-19 29/week @ 2024-03-26 55/week @ 2024-04-02

241 downloads per month

MIT license

9KB
214 lines

Monolib

A library implementing the lonely radio audio streaming protocol

Documentation

Docs.rs

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