#audio-stream #stream #player #symphonia

bin+lib url2audio

simple-to-use lib for playing audio streams

8 releases

0.3.0 Oct 25, 2024
0.2.5 Oct 14, 2024
0.2.4 Aug 2, 2024
0.2.3 Jul 30, 2024
0.1.6 Jul 8, 2024

#841 in Audio

Download history 104/week @ 2024-07-14 221/week @ 2024-07-28 15/week @ 2024-08-04 3/week @ 2024-09-15 2/week @ 2024-09-22 7/week @ 2024-09-29 165/week @ 2024-10-13 99/week @ 2024-10-20 26/week @ 2024-10-27

290 downloads per month

GPL-3.0 license

47KB
1K SLoC

Crate Badge Docs Badge

url2audio

Simple to use rust library for playing audio streams.

How to use?

// create Player instance 
let mut p = Player::new();

// open audio stream from url:
// example: https://something.from.the.web/xyz.mpr
let res = p.open(src);

println!("duration: {}", p.duration());
sleep(std::time::Duration::from_secs(3));

// pause playback
p.pause();

sleep(std::time::Duration::from_secs(3));
// resume playback
p.play();
println!("Resume at: {}", p.current_position());

sleep(std::time::Duration::from_secs(3));
// seek
p.seek(600.0);

sleep(std::time::Duration::from_secs(5));

Dependencies

~11–40MB
~691K SLoC