tunein-cli 0.6.0

Browse and listen to thousands of radio stations across the globe right from your terminal 🌎 📻 🎵✨
1
2
3
4
5
6
7
8
9
10
pub trait SampleParser<T> {
    fn parse(data: &[u8]) -> T;
}

pub struct Signed16PCM;
impl SampleParser<f64> for Signed16PCM {
    fn parse(chunk: &[u8]) -> f64 {
        (chunk[0] as i16 | (chunk[1] as i16) << 8) as f64
    }
}