3 releases
0.1.2 | Apr 21, 2020 |
---|---|
0.1.1 | Apr 10, 2020 |
0.1.0 | Apr 10, 2020 |
#1070 in Audio
240KB
6K
SLoC
Atrac3+ Decoder
Atrac3+ Decoder in Rust. Can be used as a source for Rodio. Currently only supports
the .at3
/ .wav
RIFF WAV container format.
Rodio Source
Decoder
implies rodio's Source
trait, as well as Iterator
.
Example with Rodio
use anyhow::Error;
use std::fs::File;
use std::io::BufReader;
fn main() -> Result<(), Error> {
let file = File::open("path/to/song.at3")?;
let reader = BufReader::new(file);
let decoder = atrac3p_decoder::Decoder::new(reader)?;
let device = rodio::default_output_device().unwrap();
let sink = rodio::Sink::new(&device);
sink.append(decoder);
sink.play();
sink.sleep_until_end();
Ok(())
}
Dependencies
~4.5–6MB
~111K SLoC